Link
Skip to main content

How to check if a PDF file is Linearized in JPedal?

Firstly, if you are unsure on what Linearized PDF files are, I would recommend you read this article describing what Linearized PDF files are.

Essentially, they are a layout used for PDF files which allows initial pages to be loaded while the rest of the file is still being downloaded. It saves you from having to wait for the full file to be downloaded to be able to view the first page of a PDF file.

How can we check in JPedal?

We have a method in the PdfUtilities class that will return true if the PDF file is Linearized. Below is an example of the code.

final PdfUtilities extract = new PdfUtilities("inputFile.pdf");
if (extract.openPDFFile()) {
final boolean isLinearized = extract.isPDFLinearized();
}
extract.closePDFfile();

Can JPedal modify PDF files to be Linearized?

No. The best Linearized PDF files are those that are Linearized on creation by the creation tools that support them. Although it is technically possible to linearize a PDF file after it has been created, JPedal does not support it.


Why JPedal?

  • Actively developed commercial library with full support and no third party dependencies.
  • Process PDF files up to 3x faster than alternative Java PDF libraries.
  • Simple licensing options and source code access for OEM users.

Learn more about JPedal

Start Your Free Trial


Customer Downloads

Select Download