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

How to handle Error "Unexpected token ObjectStart before 24" when Loading PDF

Thread ID:





126000 Sep 16,2016 01:36 PM UTC Feb 5,2018 09:50 AM UTC UWP 3
Tags: Pdf
Raymond Osterbrink
Asked On September 16, 2016 01:36 PM UTC

when Loading a specific Pdf created by stimulsoft-reports (attached) I get an unhandled Error called:
This is my StackTrace:
at Syncfusion.Pdf.IO.PdfParser.Error(ErrorType error, String additional)
at Syncfusion.Pdf.IO.PdfParser.Parse()
at Syncfusion.Pdf.IO.PdfParser.Parse(Int64 offset)
at Syncfusion.Pdf.IO.CrossTable.GetObject(IPdfPrimitive pointer)
at Syncfusion.Pdf.IO.PdfCrossTable.GetObject(IPdfPrimitive pointer)
at Syncfusion.Pdf.Primitives.PdfReferenceHolder.get_Index()
at Syncfusion.Pdf.Primitives.PdfReferenceHolder.GetObject()
at Syncfusion.Pdf.Primitives.PdfReferenceHolder.get_Object()
at Syncfusion.Pdf.IO.PdfCrossTable.Dereference(IPdfPrimitive obj)
at Syncfusion.Pdf.IO.PdfCrossTable.get_DocumentCatalog()
at Syncfusion.Pdf.Parsing.PdfLoadedDocument.GetCatalog()
at Syncfusion.Pdf.Parsing.PdfLoadedDocument.LoadDocument(Stream file)
at Syncfusion.Pdf.Parsing.PdfLoadedDocument..ctor(Stream file)
at Syncfusion.Pdf.Parsing.PdfLoadedDocument..ctor(Byte[] file)
at SyncfusionPDF.MainPage.d__5.MoveNext()
a test-pdf I got fromhttp://www.orimi.com/pdf-test.pdf was processed fine
what is the reason for this error, since it can't come from code?

Attachment: test_eef798b7.zip

Sasi Kumar Sekar [Syncfusion]
Replied On September 20, 2016 12:18 PM UTC

Hi Raymond, 

Thank you for contacting Syncfusion support, 

We confirmed that the issue with unexpected token object start before 24 is a defect and we logged a defect report. The fix for the patch will be available in our Essential studio volume 3 service pack 1, 2016 release. 

Please let us know If you have any concern on this.  

Sasi Kumar S. 

Raymond Osterbrink
Replied On February 2, 2018 01:43 PM UTC

My Request is 17 month old, I'm using the recent release Version 15.4460.0.20 still, this problem is not fixed. I'm quiet disapointed.

Sowmiya Loganathan [Syncfusion]
Replied On February 5, 2018 09:50 AM UTC

Hi Raymond, 

The patch for the issue “Unexpected token object start before 24 when loading the document” has been already included in the product version 15.4460.0.20( volume 3 service pack 1, 2016 release).  
Since the previously provided document is corrupted, we should load the document with OpenAndRepair parameter, please refer below snippet for your reference. 
PdfLoadedDocument document = new PdfLoadedDocument(docStream, true); 

Note: The OpenAndRepair overload is capable of resolving basic cross reference offset issues and cannot repair complex document corruption. 

Please let us know if you need any further assistance. 

Sowmiya L 


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