VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: perenboom on January 20, 2014, 10:09:07 AM

Title: Invoice is very big, > 1 mB
Post by: perenboom on January 20, 2014, 10:09:07 AM
I am busy building a shop using Virtuemart.
When I place a fake order, I receive the invoice in the mail.
Strange enough the invoice is bigger then 1 mB!

Has somebody got the idea how I can reduce this to e.g. 250 kB?
Title: Re: Invoice is very big, > 1 mB
Post by: jenkinhill on January 20, 2014, 13:19:38 PM
My invoices vary between 12Kb and 27Kb depending on the store image. Are you using a large image file?

http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: Invoice is very big, > 1 mB
Post by: perenboom on January 20, 2014, 17:39:25 PM
There are 2 logo's use on the invoice: the shop logo: 91 kB and the shipper logo 2,24 kB.
So in total, together with some tekst, it should be like 125 kB which is acceptable for my. But not more than 1 mB.

My own invoices (I have a company) are never bigger than 250 kB (and that's a big one).

Solutions, anyone?
Title: Re: Invoice is very big, > 1 mB
Post by: AH on January 20, 2014, 18:43:20 PM
I think you might find that even a small sized logo stored by TCPDF will create a larger than expected file
Title: Re: Invoice is very big, > 1 mB
Post by: reinhold on January 20, 2014, 19:58:01 PM
Do you use a unicode font in the config of the invoice?
TCPDF (the library used to create the PDF) always includes the full font, even if only one or two characters are actually used. Unicode fonts can be quite large...
Title: Re: Invoice is very big, > 1 mB
Post by: perenboom on January 20, 2014, 20:09:56 PM
I have tried all 3 possibilities but with no result.
I can't imaging that I am the only one with this problem!?!