Search code examples
phpzend-pdf

Zend PDF inflates file size


I am using ZendPdf to reorder some pages in a PDF. No other changes are taking place, yet somehow a file that starts as 400k is being inflated to 5mb after being re-ordered and saved.

Does anyone know why, or how to make it save more optimally?

Note, I need to keep the default option of embedding the font which is already in the original document.


Solution

  • Using the ZendPdf/Resource/Extractor clonePage method instead of the native php clone method resolved thsi issue