Skip to content

Compatibility options #284

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 10 commits into
base: master
Choose a base branch
from
Open

Conversation

Technus
Copy link

@Technus Technus commented Jun 25, 2025

Added couple compatibility options for writing/reading the PDF file:

Accessible as properties in: PdfReaderOptions and PdfDocumentOptions

        public bool EnableReferenceRenumbering { get; set; } = true;
        public bool EnableReferenceCompaction { get; set; } = true;
        public bool EnableImplicitTransparencyGroup { get; set; } = true;
        public bool EnableImplicitMetadata { get; set; } = true;
        public bool EnableWriterCommentInTrailer { get; set; } = true;
        public bool EnableLfLineEndings { get; set; } = true;
        public bool EnableOwnBinaryHeader { get; set; } = true;
        public bool EnableLineBreakInArrayObjects { get; set; } = true;
        public bool DisablePagesAndCatalogAtEnd { get; set; } = true;

Mainly to align the binary format of the file to match SAP/Acrobat more closely and fix printing issues on Ricoh printers.

Setting them to non default values enables the patch.

@Technus
Copy link
Author

Technus commented Jun 25, 2025

Main culprit seems to be EnableLineBreakInArrayObjects, no other writer seem to include any whitespace after the [ sign. And after changing that printing started to work as expected.

@StLange
Copy link
Member

StLange commented Jul 23, 2025

Hi!
The upcoming version 6.2.1 writes the content of each object in one single line. This fixes your issue with left brackets.
But what are the benefits of CRLF instead of LF? Or why writing Page objects and Catalog at the end of the PDF file?

@Technus
Copy link
Author

Technus commented Aug 4, 2025

It s just the binary differences compared to the input file I found while opening and saving the file. Might be a non issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants