pdf file size - too big for email

I am new to pdf include and new to OEhive. we have a custom module which attaches "invoices" in pdf format and sends it as an email. The problem that we are facing is that for some reason the size of the files increases to 2 - 6 MB even though based on the amount of information that is packaged the pdf file should be far smaller around 100k (as per the users ..).
has anyone faced this problem ..all helpful tips would be appreciated. (I am new to this functionality and am going through the code ...).
if more information is needed - please let me know.

Thanks in Advance !!


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alonb's picture

that's nothing :)because

that's nothing :)

because pdfinclude forms don't work

most people use a background image of their form and overlay the field values over the image

atleast that's what we had to do, way back then

and because of how pdfinclude works it would multiply the image and the pdf file size for every page you insert.

we had this one customer that needed to produce a document with about a thousand pages.

the file size was several gigabytes!

and for some reason when you opened the file in acrobat and printed it, it would send a 20 gigabyte job to the printer :)

well, that was just one of the problems. we had tons more issues with internationalization because we needed to use hebrew.

using pdfinclude was so frustrating when i think about it.

use anything else but don't use pdfinclude.

that's the reason we eventually wrote slibooxml.

http://www.oehive.org/project/libooxml

it's 100% 4gl, works on unix/linux and windows, just drop it on the propath.

you can use it to create office documents, pdf, html files and more.


not true (anymore?)

@Alonb:
This is simply not true anymore, you should try the last version.
When I took over the project the first thing I did is fix the duplication of some objects (and not the whole form, IIRC it was the fonts). This was done more than one year ago.
Today the whole form object is only once in the pdf file, whatever pages your document may have.
By the way, pdfinclude is open source, so instead of creating a new project, a fix would be welcome and would benefit everyone ;-)
I do use pdfinclude in production (that's why I fixed it, and published my fixes and enhancements), to produce multi-page documents, many thousands a month, and have no problem of size or whatever. Optimisation has always be a concern to me.

@rsn444: which version of pdfinclude are you using? You should use the SVN version (the explanations to download a zip file are on the pdfinclude frontpage).