How do I maintain PDF/X compatibility with the latest version of PDFNet SDK?


We use PDFNet library to export graphic designs to PDF. Recently after updating the library to the most recent version we’ve encountered a problem where our export filter no longer produces PDF/X compliant PDF document with the ‘save to PDF/X’ settings enabled, whereas the old one was doing this pretty well.

For some reason the PDF now contains compressed object streams, it contains cross-reference streams, etc. Why is that happening and what is the best way to make sure the output document is PDF/X compliant given that it was generated using the rules that worked well before?


Starting with v.5.5.0 (, PDFNet by default produces files compressed obj streams and compressed xrefs. For docs this setting can produce singnificantly smaller files.

In order to disable compressed object streams you can pass the e_compatibility flag to doc.Save. For example:

doc.Save(“out.pdf”, SDFDoc.e_remove_unused | SDFDoc.e_compatibility);