Skip to content

Handle line feed character in EOD marker for base85 decoder #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michael-michalski
Copy link

Hello :)
We are receiving base64 encoded pdfs from our partner, which has an additional non-spec line feed character. We use pdfsharp to open them with a memory stream, and perform some edits.

image

The adobe documentation outlines the EOD marker as ~>: https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf

image

But if I open the pdf in several popular pdf viewers/browsers it correctly interprets the pdfs, contrary pdfsharp raises an invalid character exception.

Should this path be less strict, or is there something I am misunderstanding?

@ThomasHoevel
Copy link
Member

Looks like a bug in PDFsharp. We will fix it. Thanks for letting us know.
Any whitespace should be ignored, so your PR is not the ultimate fix.

It would be good to have a PDF for testing. You can attach the PDF here, send it by email or upload to our FTP server.
https://docs.pdfsharp.net/General/Issue-Reporting/FTP-uploads.html

@ThomasHoevel ThomasHoevel added the bug Something isn't working label Mar 20, 2025
@michael-michalski
Copy link
Author

Unfortunately the PDF's are filled with customer data, so I would have to scramble an example together.
I will try to write an example PDF.

@StLange
Copy link
Member

StLange commented Mar 24, 2025

The bug you found was not the only one. I rewrote the whole code. See here.

@michael-michalski
Copy link
Author

michael-michalski commented Mar 25, 2025

If you need it for tracking. The pdfs encountered where Fedex freight labels.

@michael-michalski
Copy link
Author

When can we look forward to a Nuget prerelease? :)

@michael-michalski
Copy link
Author

Hey Team,
Is there a planned release of a new preview for 6.2, with the new base85 decoder?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants