Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Mon Apr 22, 2019 10:35 pm

Spire.Pdf v5.4.9

PdfDocument.SaveToFile(…) throws an 'Unexpected token Unknown before 83178' exception when attempting to save a PDF. The original PDF file is processed via the Spire.PDF API to normalize page sizes, orientation, rotation, margins etc. prior to saving. The original file prior to processing is a valid PDF file, however, the processed file throws the following exception when attempting to save. Thousands of PDF files are processed every day for several months without issue until this exception. Files have been emailed to Spire support.

Spire.Pdf.Exceptions.PdfException
HResult=0x80131500
Message=Unexpected token Unknown before 83178
Source=Spire.Pdf
StackTrace:
at spr៣.ᜀ(ᜀ A_0, String A_1)
at spr៣.ᜀ(TokenType A_0, TokenType A_1)
at spr៣.ᜐ()
at spr៣.ᜀ(Int64 A_0)
at spr៚.ᜀ(spr᜴ A_0)
at spr៝.ᜃ(spr᜴ A_0)
at sprᝣ.ᜂ()
at sprᝣ.ᜀ()
at sprᝣ.ᜁ()
at sprᝣ.ᜀ(spr᜶ A_0)
at spr᝛.ᜄ(spr᜶ A_0)
at spr᝛.ᜀ(spr᜶ A_0, Boolean A_1)
at spr᝛.ᜅ(spr᜶ A_0)
at spr᝛.ᜄ(spr᜶ A_0)
at spr᝛.ᜀ(spr᜶ A_0, Boolean A_1)
at spr᝛.ᜅ(spr᜶ A_0)
at spr᝛.ᜄ(spr᜶ A_0)
at spr᝛.ᜀ(spr᜶ A_0, Boolean A_1)
at sprᝤ.ᜃ(spr᜶ A_0)
at spr៝.ᜀ(spr᜴ A_0, sprᝢ A_1, spr៦ A_2)
at spr៝.ᜀ(spr᜴ A_0, spr៦ A_1)
at spr៝.ᜄ(spr៦ A_0)
at spr៝.ᜅ(spr៦ A_0)
at Spire.Pdf.PdfNewDocument.Save(Stream stream)
at Spire.Pdf.PdfDocumentBase.Save(String filename)
at Spire.Pdf.PdfDocument.SaveToFile(String filename)

mscotto511
 
Posts: 13
Joined: Fri Sep 21, 2018 3:45 pm

Tue Apr 23, 2019 7:16 am

Hi,

Thank you for your inquiry.
I have reproduced your issue and logged it into our bug tracking system for further investigating and fixing. If there is any update, we will let you know. Sorry for the inconvenience caused.

Sincerely,
Nancy
E-iceblue support team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Tue Jul 02, 2019 9:58 am

Hi,

Thanks for your patient waiting.
The reported issue has been fixed. Welcome to download the hotfix from the following link.
Website link: Spire.PDF Pack Version:5.7
Nuget link: https://www.nuget.org/packages/Spire.PDF/5.7.0

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Mon Dec 06, 2021 7:51 am

Greetings, I have similar exception in freespire.pdfviewer version 4.1.0
SaveToStream(stream As System.IO.Stream, format As FileFormat) throws exception
{"Unexpected token Unknown before 3"}

MazenAhmed
 
Posts: 1
Joined: Mon Dec 06, 2021 7:22 am

Mon Dec 06, 2021 9:10 am

Hello,

Thanks for your inquiry!

To help us reproduce your issue quickly and efficiently, please provide us with the following information for reference. Thanks in advance.

1. Your target framework (E.g. .Netframework 4.8.0).
2. Your testing code.
3. Your input file (if any).

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Tue Dec 21, 2021 6:11 am

Hello,

Hope you are doing well!

How is the issue now? If it still exists, could you please provide the information I mentioned before to us for further investigation?

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF

cron