David GOPOIS
David GOPOIS

Reputation: 21

With iText 5, how to save a PDF file as linearized PDF

With iText 5 (java), is it possible to save a PDF file as a linearized PDF, also called sometimes “Web Optimized” or “Fast Web View” enabled PDF ?

Upvotes: 2

Views: 707

Answers (1)

mkl
mkl

Reputation: 95918

iText 5 does not have a feature for saving linearized PDFs.

Actually this would not fit the iText 5 architecture at all which attempts to write data to its target output stream as early as possible, and you cannot do that while creating a linearized PDF.

Nonetheless, you can of course create a PdfStamper-like class which takes a PdfReader representing an existing PDF and stores it as a linearized PDF. This will require quite some coding, though.

Upvotes: 1

Related Questions