concept PDF version in category itext

appears as: PDF version, PDF Version, PDF version
iText in Action, Second Edition

This is an excerpt from Manning's book iText in Action, Second Edition.

In some cases, iText changes the PDF version automatically. In listing 1.3, you changed the user unit, and this capability was introduced in version 1.6 of the PDF specification. Because you changed the user unit before step , iText was able to update the PDF version in the header to %PDF-1.6.

It’s a better practice to set the version number with PdfWriter.setPdfVersion() if you use PDF features that are newer than what was available in PDF 1.4. Here’s how to change the PDF version to 1.7.

Listing 1.10. HelloWorldVersion_1_7.java

It’s not forbidden for the PDF version in the header to be different from the PDF version in the catalog, but it’s good practice to make setting the PDF version a part of your initializations to avoid ambiguity.

sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest