Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
To determine if a PDF is linearized (also known as “web-optimized” or “fast web view”), you generally need to inspect the PDF’s structure. A linearized PDF allows for efficient incremental loading of the document, which means it can be displayed in a web viewer before the entire file is downloaded.
Some things you can try:
Use a PDF library that can inspect the internal structure of the PDF to detect linearization.
Look for specific markers in the PDF header that indicate linearization, such as the presence of “Linearized” in the first few lines.
Implement a method to read the PDF’s bytes and parse the header for linearization information.
Here are some resources that might help you:
Running WebViewer as a Web Component - Understand how WebViewer can be used in a web application, which may help in loading linearized PDFs efficiently.