Re: Change PDF Version that reportlab generates

Robin Becker <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
On 10/03/2016 13:10, Volker Haas wrote:
> Hi Robin,
> thanks for your quick answer.
>
> To be honest I believe(!) I need no special PDF 1.6 feature, the PDF just
> needs to pass some conformance test that checks for version 1.6+.
> I could probably satisfy that easily by using some external converter but
> I'd like to avoid that.
>
> Are the PDF version downwards compatible, 1.4 being a "subset" of 1.6? I'll
> try to clarify if there are any specific 1.6 requirements I need.
>
> Cheers,
> Volker
......
I believe they are strictly inclusive, so each feature in the latest pdfspec 
indicates what version it arrived in; later readers are supposed to cope with 
the later features.

The code that sets the pdf version on the PDFDocument object is essentially

doc._pdfVersion = (1,3)

applied before the final rendering. Alternatively one could hack things by doing

reportlab.pdfbase.pdfdoc.PDF_VERSION_DEFAULT = (1,4)

but I find setting stuff on modules can be a bit flaky sometimes as you need to 
do it before anyone else grabs the values.


I'm not sure what extra features a document marked 1.6 is required to provide as 
I have understood the version number to indicate to renderers what may be 
present in the document.
-- 
Robin Becker
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.