Forum


Replies: 1   Views: 64
Memory consumption

Posted by didiergm  · 12-10-2019 - 05:57

I routinely generate PDF using mPDF but on larger documents (mainly reports off a databse) I encounter a memory issue and was wondering if in phpdocx the whole document was kept in memory or if it is possible to have each page dumped to the output file during the production process.

Although there usually is a  performance hit, it solves the memory consumption issue 

Posted by admin  · 12-10-2019 - 10:24

Hello,

The whole document is loaded in memory, DOCX documents work with sections, not with pages. Anyway, working with DOCX documents is much faster than PDF documents.

Premium licenses options to get the best performance not available in Basic and Advanced licenses, such as working with in-memory documents and streams (https://www.phpdocx.com/documentation/cookbook/ Performance section).

Regards.