Text export produces unexpected results

2 posts, 0 answers
  1. Frank
    Frank avatar
    1 posts
    Member since:
    Nov 2014

    Posted 06 Mar 2017 Link to this post

    I've just edited the First_Look example of the PdfViewer. If I generate a text export, by using:

                var provider = new PdfFormatProvider(str, FormatProviderSettings.ReadOnDemand);
                RadFixedDocument doc = provider.Import();
                textBlock.Text = new TextFormatProvider().Export(doc, new TextFormatProviderSettings());

    I recognize, that the results are not as expected. Some special characters are not correctly translated. In figure 1 the special character ‘ (\u2018) is displayed in the pdfview correctly whereas in the generated text the character was translated in \u0091 which is for private use. Also for non special characters there is also an unexpected behavior visible. In figure 2 it is visible that the 'fl' is missing in the word 'beeinflussen'. The string is translated in "beein\u001fussen". This means that the two characters 'fl' is replaced by the single character \u001f. This \u001f means 'Unit Seperator' which makes in this context not much sense for me.

    Thank you

  2. Deyan
    Deyan avatar
    164 posts

    Posted 08 Mar 2017 Link to this post

    Hello Frank,

    In PDF format the rendering of the text glyph geometries in the UI and the copy-paste or export of some selected text are defined with separate resources. Generally, it is possible that the text behind the visual representation has nothing in common with the rendered glyphs geometries. However, as this is very specific to the PDF document content, we need to take a look at the concrete PDF file in order to investigate what causes the issue. You may open a new support ticket in order to attach the PDF file there.

    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top