This is a migrated thread and some comments may be shown as answers.

Text export produces unexpected results

1 Answer 104 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 06 Mar 2017, 07:58 AM

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

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 08 Mar 2017, 02:52 PM
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.

Regards,
Deyan
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.
Tags
PDFViewer
Asked by
Frank
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or