We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Unexpected token Unknown before 118 - SfPdfViewer

Thread ID:

Created:

Updated:

Platform:

Replies:

126394 Oct 13,2016 03:40 AM Nov 7,2016 05:58 AM UWP 5
loading
Tags: Pdf
Flikkema
Asked On October 13, 2016 03:40 AM

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

Sasi Kumar Sekar [Syncfusion]
Replied On October 14, 2016 09:37 AM

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. 


Flikkema
Replied On October 17, 2016 02:07 AM

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"

Sasi Kumar Sekar [Syncfusion]
Replied On October 18, 2016 05:30 AM

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. 


Flikkema
Replied On November 4, 2016 09:53 AM

Is there any way to solve this problem (cannot find the PDF catalog information) ?


Thanks in advance,
Bohdan

Sasi Kumar Sekar [Syncfusion]
Replied On November 7, 2016 05:58 AM

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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;