Telerik PDF viewer with silverlight

Elena

Hi,
We have a telerik pdf viewer in XAML file and load pdf file from stream PDFview.pdfViewer.DocumentSource = NewPdfDocumentSource(NewMemoryStream(_docData.Data))but some pdf files e.g.TelerikReporting-LearningGuide.pdf are displayed incorrect (wrong encoding, strange signs or not displayed att all without error message)
Would be very grateful for any hints.

Elena

When I open Byte array as Uri in Internet Explorer it display Ok.
I save ANY pdf file in my Database as Byte array and then try to open it in my Silverlight application on Client side.
Don't use encoding when save the file.

Best regards
Elena

Petya

Hi Elena,
It seems that the problem may be caused by null bytes at the end of the PDF document.

In some cases when the document is preserved in a database, it has many null bytes appended at the end. RadPdfViewer starts to read the PDF files from their end trying to locate the %%EOFmarker. If there are such null bytes, the marker cannot be found and the file cannot be loaded properly.
I hope this helps!

Elena

Hi Petya,
Thank you for reply.
I checked byte arrays for pdf files which are not displayed correct.
One file which shows wrong characters (see attached) has 11997243 bytes and "79,70,13" in the end.
Second file which has 12792773 bites and "79,70,13,10" in the end
and doesn't return any Document at all:

Kammen

I think there might be a misunderstanding here. Can you please comment on the following:
1. Which version of RadPdfViewer you are using?
2. When you save this file as .pdf file, can you open it with RadPdfViewer (both in your application and in our online demo)?
3. When you are trying to load the pdf document in RadPdfViewer from your database, what is displayed? (A screenshot may be helpful here.)

We have tested this document (TelerikReporting-LearningGuide.pdf) in our online demo and it seems that everything is working as expected. The online demo is using Q1 version of our controls, which brings an entirely new text rendering system for RadPdfViewer.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.