mekentosj / podofo

PoDoFo is a library to work with the PDF file format. The name comes from the first letter of PDF (Portable Document Format). A few tools to work with PDF files are already included in the PoDoFo package. This repo is a fork of the code at http://svn.code.sf.net/p/podofo/code/podofo/trunk
GNU General Public License v2.0
53 stars 29 forks source link

Compact write-mode and ISO PDF #15

Open jsonn opened 7 months ago

jsonn commented 7 months ago

While verifying PDF-A compliance of documents, I stumbled across PoDoFo's default output mode violating the ISO specs. The VeraPDF rule with reference is: https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-619-1

The code in question is: https://github.com/mekentosj/podofo/blob/42801993458e0acc06882d3e6a3e44e762154193/src/base/PdfObject.cpp#L168

The easiest solution would be to just drop the conditional and the size impact should be pretty small.