Q: What is a linearized PDF
file?
-----
A: A linearized PDF file is a PDF file that is structured in a way that allows the first page of the PDF file to be displayed in a user’s Web browser before the entire file is downloaded from the Web server. If you're developing a Web-based system that creates large PDF files for delivery to Web browsers over the Internet, you should try to make sure that your system can generate linearized PDF files. Your users might become frustrated and impatient if your system creates large PDF files that are not linearized, because it could take 30 seconds or even longer for a user’s Web browser to display a large PDF file that is not linearized.
PDF linearization is also know as 'fast web view'.
- PDFNet SDK can be used to linearize existing/new PDF. This can be done both on the client and server side.
To save exsiting (or new) PDF documents using 'fast web view' you only need to pass 'SDFDoc.SaveOptions.e_linearized' flag in PDFDoc.Save() method.
- On the clinet side, all PDFNet SDK viewers support incremental / on-demand download of linearized files (via PDFViewCtrl.OpenURLAsync())
This eliminates need for various hacks to enable smooth online document viewing. For example, there is not need to split PDF into many files (e.g. per-page). The file size does not bloat since shared resources such as fonts, images, ... are not replicated among files. There are no hickups during viewing and everything works automagically... PDFNet viewers also support saving partial download sessions. This means that users can view partial content offline and continue with download when the internet connection resumes.
Relevant links: