Even on telerik demo page.
You can download the pdf file on here.
Any one can give me a clue on this?
thanks
You can download the pdf file on here.
Any one can give me a clue on this?
thanks
5 Answers, 1 is accepted
0
Sandhiya
Top achievements
Rank 1
answered on 28 Aug 2013, 04:40 PM
Now the problem become more complex.
Some pdf files can be opened, and some files can't.
All pdf files are generated by iTextSharp 5.4.3
Below are 2 sample files:
Can be opened.
Can't be opened.
Any comment will be appreciated.
Some pdf files can be opened, and some files can't.
All pdf files are generated by iTextSharp 5.4.3
Below are 2 sample files:
Can be opened.
Can't be opened.
Any comment will be appreciated.
0
Hello Sandhiya,
Alexander
Telerik
Thank you for contacting us!
The first document (DO13080002.pdf) is loaded correctly, but the second one (DO13080003.pdf) is not.
We will need to investigate this issue further.
If you have any other questions or concerns, please do not hesitate to contact us again!
Alexander
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Sandhiya
Top achievements
Rank 1
answered on 29 Aug 2013, 08:56 AM
Hi Alexander,
I have opened support ticket (#731428).
In there, I already submit 2 similar pdf files.
1 file has table with borders (loaded correctly), the other 1 file has table without borders (failed to be loaded).
All the contents between that 2 files are 100% same.
So I think the issue is with table borders.
I have opened support ticket (#731428).
In there, I already submit 2 similar pdf files.
1 file has table with borders (loaded correctly), the other 1 file has table without borders (failed to be loaded).
All the contents between that 2 files are 100% same.
So I think the issue is with table borders.
0
Accepted
Hi,
Actually, the problem with the files you provided is that they do not end with %%EOF marker. This marker is required for RadPdfViewer to work correctly. If you open your files with any text editor (Notepad for example), you will find that your document ends with a lot of null bytes. RadPdfViewer is designed to search for %%EOF marker in the last 1024 bytes. If it does not find one, the document will not be displayed at all. You will need to trim those null bytes in order to open the documents in RadPdfViewer.
More information about this can be found in this help article.
Let us know if you have further questions.
Regards,
Kammen
Telerik
Actually, the problem with the files you provided is that they do not end with %%EOF marker. This marker is required for RadPdfViewer to work correctly. If you open your files with any text editor (Notepad for example), you will find that your document ends with a lot of null bytes. RadPdfViewer is designed to search for %%EOF marker in the last 1024 bytes. If it does not find one, the document will not be displayed at all. You will need to trim those null bytes in order to open the documents in RadPdfViewer.
More information about this can be found in this help article.
Let us know if you have further questions.
Regards,
Kammen
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Sandhiya
Top achievements
Rank 1
answered on 30 Aug 2013, 09:50 AM
Hi Kammen, thank you for pointing this out.
You are right, we use wrong method when converting from MemoryStream to byte[]
We use .GetBuffer() instead of .ToArray()
And we also don't realize there are so many trailing nulls in the pdf file.
You are right, we use wrong method when converting from MemoryStream to byte[]
We use .GetBuffer() instead of .ToArray()
And we also don't realize there are so many trailing nulls in the pdf file.