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.

Fri Nov 29, 2024 1:04 pm

Hello,

Now and then, we get an error in our production environment when we want to save a new PDF document (see stacktrace beneath). The PDF generation is in a Windows service. When error occurs, it looks like something is "stuck" inside our application (haven't been able to find it in our code yet) or inside the Spire package. From then, every time a PDF has to be generated this error happens, until we restart the service. We were not able to reproduce the error yet.

We have no clue what this error means exactly. Which header are we talking about? Why could this header checksum be illegal anyway and why is it illegal in our case? Is there a way to extract the header that is mentioned in the error message? Do you have any more information about this specific exception, how to fix it or how to work around it? We found an old topic (post49277.html) about this error on the forum, but there doesn't seem to be a solution there.

Code: Select all
System.FormatException: Header checksum illegal
  at spr퀪.꺩()
  at spr퀪..ctor(Stream A_0, Boolean A_1)
  at spr켆.㶻(Byte[] A_0)
  at spr䚌.濩(Byte[] A_0, spr뛲 A_1)
  at spr䨕.ꯕ()
  at spr居.ꯕ()
  at spr뛲.ꡌ(spr랧 A_0)
  at spr뛲.꤁(spr욀 A_0)
  at spr풤.ꡌ(spr씖 A_0, spr쾱 A_1, List`1 A_2, Dictionary`2 A_3, Boolean A_4)
  at spr풤.ꡌ(spr큦 A_0, Boolean A_1)
  at spr풤.꤁(spr큦 A_0, spr학 A_1)
  at spr풤.ꡌ(PdfDocumentBase A_0)
  at Spire.Pdf.PdfNewDocument.Save(Stream stream)

berrydictu
 
Posts: 22
Joined: Fri Dec 15, 2023 12:58 pm

Mon Dec 02, 2024 2:32 am

Hello,

Thank you for your inquiry.

Could you please provide the version number of the Spire.Pdf.dll you are currently using? If it is not the latest version 10.11.7, please update to the latest version and try again, as we resolved an issue with the "Header checksum illegal" error encountered when using the PdfCompressor to compress documents in our September updates.

If the problem still persists after updating to version 10.11.7, please provide the following information to assist us in our investigation:
1. Please provide all code related to our product as comprehensively as possible.
2. Please provide the PDF document and the input values used in the code at the time you first encountered this error, so we can conduct a simulation test to reproduce the issue and investigate the cause.
3. Does this error occur in your production environment? Have you also encountered it during local testing?
4. Your system Environment: Please provide details about the system environment where the error occurs, including but not limited to:
- Operating System (OS) version
- .NET Framework or .NET Core/.NET 5+ version
- Any other relevant software or libraries being used

Thanks for your assistance in advance.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2912
Joined: Wed Jun 27, 2012 8:50 am

Tue Dec 03, 2024 5:57 pm

We will have a look at that, thank you!

berrydictu
 
Posts: 22
Joined: Fri Dec 15, 2023 12:58 pm

Wed Dec 04, 2024 3:45 am

Hello,

Have you managed to resolve this issue?

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2912
Joined: Wed Jun 27, 2012 8:50 am

Wed Dec 04, 2024 1:50 pm

The update seems to have fixed the problem, thank you for your advice!

berrydictu
 
Posts: 22
Joined: Fri Dec 15, 2023 12:58 pm

Thu Dec 05, 2024 1:56 am

Thanks for your response.

Please contact us again if you need further assistance.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2912
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF

cron