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

Startxref keyword cannot be found

2 Answers 612 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Bryand
Top achievements
Rank 1
Bryand asked on 27 Jun 2016, 05:14 PM

I am running into this issue: "Startxref keyword cannot be found". 

I was referencing the information in the link below, and it did not solve my problem. My PDF does not have a blank space at the end, and using the code in the link didn't make the error go away. What other possible causes for this issue are there? I am unable to provide the document that is having issues because the document is confidential. 

http://www.telerik.com/support/kb/winforms/pdf-viewer/details/notsupportedexception-startxref-keyword-cannot-be-found-when-loading-pdf-file-in-radpdfviewer-for-winforms

Thanks,

Bryand

2 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 30 Jun 2016, 11:36 AM
Hello Bryand,

As mentioned in the link you have sent, RadPdfViewer depends on the requirement that startxref keyword should be withing the last 1024 bytes of the PDF file. Although your file may not be ending with "NUL" bytes, it may have some appended content at the end. In order to fix the file you may try to search for the last "startxref" text in the file and remove all the content after the following "%%EOF" text. In the screenshot this content is shown as "NUL" bytes.

If this still does not fix your issue you may open a support thread and attach the sample file. We are going to use it only for test purpose and not going to distribute it as it is confidential.

I hope this helps.

Regards,
Deyan
the Telerik team
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Bryand
Top achievements
Rank 1
answered on 30 Jun 2016, 01:52 PM

Hi Deyan. 

Thank you for the reply. But I figured out the issue. My issue was caused because "startxref" was followed by blank space instead of a new line. This might be something you guys might want to look at. Thanks again. 

-Bryand

Tags
PDFViewer
Asked by
Bryand
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Bryand
Top achievements
Rank 1
Share this question
or