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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Unexpected token Unknown before 118 - SfPdfViewer

Thread ID:





126394 Oct 13,2016 07:40 AM UTC Nov 7,2016 10:58 AM UTC UWP 5
Tags: Pdf
Asked On October 13, 2016 07:40 AM UTC

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 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. 
Sasi kumar S. 

Replied On 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"

Sasi Kumar Sekar [Syncfusion]
Replied On 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. 
Sasi kumar S. 

Replied On November 4, 2016 01:53 PM UTC

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

Thanks in advance,

Sasi Kumar Sekar [Syncfusion]
Replied On 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. 
Sasi kumar S. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon