Unexpected token Unknown before 118 - SfPdfViewer
Hi. when I try to load PDF file I get an exception which I add to attachments. I think my error is very similar to this one ( Same error ).
How can this be solved? Need this functionality for yesterday already :)
Attachment: Errors_a5d0ac8f.rar
How can this be solved? Need this functionality for yesterday already :)
Attachment: Errors_a5d0ac8f.rar
SIGN IN To post a reply.
5 Replies
SK
Sasi Kumar Sekar
Syncfusion Team
October 14, 2016 01:37 PM UTC
Hi Bohdan,
Thank you for contacting Syncfusion support,
The “Unexpected token Unknown before 118”may throw due to the document is corrupted. We have a option to load the corrupted pdf document using isOpenAndRepair property, So we suggest you to use the below code snippet to load the document.
|
PdfLoadedDocument loadeddocument= new PdfLoadedDocument(Filestream,true);
|
Please find the online documentation link below.
Online documentation link:
Please try our suggestion, if you still facing any issue kindly provide the input document. We will analyze and provide the solution earlier.
Please let us know if you have any further assistance.
Regards,
Sasi kumar S.
FL
Flikkema
October 17, 2016 06:07 AM UTC
Sasi kumar S, thanks for your help! Adding that "true" parameter really helps to solve the problem.
Can you please also tell what can be the reason for getting this error: "Cannot find the Pdf catalog information"?
Can you please also tell what can be the reason for getting this error: "Cannot find the Pdf catalog information"?
SK
Sasi Kumar Sekar
Syncfusion Team
October 18, 2016 09:30 AM UTC
Hi Bohdan,
Thank you for your update,
The PDF document has certain standard structure, it has Cross-reference table to stores the offset location for each objects. The catalog tells the application where to start reading the document, it is just the pointer of the root page tree. The “cannot find the PDF catalog information” is throws only when the offset location of a catalog is mismatched in Cross-reference Table.
Thanks,
Sasi kumar S.
FL
Flikkema
November 4, 2016 01:53 PM UTC
Is there any way to solve this problem (cannot find the PDF catalog information) ?
Thanks in advance,
Bohdan
Bohdan
SK
Sasi Kumar Sekar
Syncfusion Team
November 7, 2016 10:58 AM UTC
Hi Bohdan,
Thank you for your update,
We do not have any other option to solve the “Cannot find the PDF catalog information” issue, please contact the person who created this document.
Please use the below code snippet as we suggested earlier to repair the document.
|
PdfLoadedDocument loadeddocument= new PdfLoadedDocument(Filestream,true); |
Please let us know if you need further assistance.
Regards,
Sasi kumar S.
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
FL Flikkema
- Oct 13, 2016 07:40 AM UTC
- Nov 7, 2016 10:58 AM UTC