Php – Printing PDF – prints 50Mb from 1Mb PDF file ..

pdfPHPprinting

I have this PDF file which is just 1Mb – 30 pages .

So when I send it to printer ( HP 1320 ) i see that computer sends almost 50Mb to the printer. How is that possible ? I know that PDF is compressed format, but when i try command line program pdf2ps – i can generate postscript that is just 2.5Mb . I don't think it's so compressed 50/1 that would be something .. Any ideas ?

The file is generated by php tcpdf can it have anything to do with it.
Does PDF have any magical features ?

Best Answer

I've seen this before, and it was solved by this KB article: http://support.microsoft.com/kb/919543 (assuming you are using Windows)

When you print a document that contains lots of raster data, the size of the Enhanced Metafile (EMF) spool file may become very large. Files such as Adobe .pdf files or Microsoft Word .doc/.docx documents may contain lots of raster data. Adobe .pdf files and Word .doc/.docx documents that contain gradients are even more likely to contain lots of raster data.

This problem occurs because Graphics Device Interface (GDI) does not compress raster data when the GDI processes EMF spool files and generates EMF spool files.

This problem is very prominent with printers that support higher resolutions. The size of the raster data increases by four times if the dots-per-inch (dpi) in the file increases by two times. For example, a .pdf file of 1 megabyte (MB) may generate an EMF spool file of 500 MB. Therefore, you may notice that the printing process decreases in performance.

Related Topic