This is an old post, but it is basically the only relevant one that comes up when you google evopdf and file size, and I would like to point others with the same problem as me in the right direction.
I recently had a problem with large file size in my application that creates millions of pdfs with evopdf every month. It is therefore important that the size is as small as possible.
When analyzing the result document I noticed that 90% of the file was made up of "X Object Forms".
After a lot of testing I finally discovered that using html tables in the source document makes evopdf save this huge chunk of X Object Forms, taking up 283kb of a 312kb pdf file.
When I rewrote the code to use <div>
with css display: table, table-cell etc. instead of <table>
, the file size instantly went from 312 to 42 kb. That is a very significant decrease and will save us a lot of diskspace in the future.
Hope this helps someone.
Edit: On further research, I believe this has to with the use of <thead>
and <tfoot>
. they are reused on subsequent pages when a table spans multiple pages, and I guess that they are stored as X Object forms. It sort of makes sense, but the functionality is not worth the extra kilobytes when it's not necessary.
It would be nice if someone from evopdf can confirm that this is the case.