[reportlab-users] Large images in PDF cause viewing error

Brenner, Aaron L abrenner at pitt.edu
Wed Jul 28 14:25:04 EDT 2010


Hi all,

I'm creating PDFs from jpegs using Reportlab Toolkit. The PDF documents are created by first down-sampling large TIFF files to 200ppi jpegs (using ImageMagick), and then using Reportlab to assemble them into PDF, adding a visible text annotation above each image. The size of each canvas object varies depending on the size of the source image, plus the space required for the text annotation.

These PDFs all open fine when viewing with the Acrobat Reader application (9.3.2), but some of the PDFs return an error message and a blank first page when viewed through a web browser using the Acrobat PDF Plug-In. The errors all seem to occur when the first page image is rather large, e.g. over 50" in one dimension (that's calculated at 72 or 96ppi?). Errors are consistent with different browsers (presumably using the same plug-in, however).

I've tried to investigate this problem online and am having trouble getting information. I suspect that the plug-in is trying to display the first page before it has completed loading. Is there a configuration option, or options, available when creating the PDF in Reportlab, that could address this behavior? I notice, for example, when viewing document properties in Acrobat that "Fast Web View" is not enabled. Adobe seems to recommend using Fast Web View for PDFs larger than 4MB [http://help.adobe.com/en_US/Acrobat/9.0/Standard/WS58a04a822e3e50102bd615109794195ff-7f52.w.html] Is there a method to enable this in the reportlab toolkit?

Any other thoughts or suggestions are appreciated.

Example file that causes plug-in error (12.55MB) is here:
http://digital.library.pitt.edu/u/ulsmanuscripts/pdf/31735051654782.pdf

Thanks,

Aaron Brenner
--
Coordinator, Digital Research Library
University Library System
University of Pittsburgh
7500 Thomas Blvd., Room 306
Pittsburgh, PA 15260

Phone: 412.244.7526
Fax: 412.244.7537


More information about the reportlab-users mailing list