Jump to content

PDF Invoice Sizes 500KB vs 8KB


tgriff

Recommended Posts

An upgrade to 4.4.2 was successful today. Yeah!

I am enjoying the features that were added to this latest update and am glad to report the transition was a smooth one.

 

Now - regarding PDF invoice

This appears to be an issue each time I update the software.

 

see http://docs.whmcs.com/PDF_Invoice#Reducing_the_Filesize_of_PDFs

 

Is there a way to resolved this as an admin option - as opposed to editing a core file?

That would be a desirable thing!

 

Anyone else experience heavy PDF invoices or have another suggestion as to why the 500KB invoice is a good thing?

 

Good stuff!

Tim Griffin

http://missioncommunicate.com/members

twitter: @tgrifff

Link to comment
Share on other sites

There is an explanation somewhere as to why pdf invoices are so big (something to do with storing all the possible font combinations I believe).

 

So, for maximum compatibility leave the pdf line mentioned as it is, but get big invoices, or simply confine the font to one of the standard core pdf fonts and everything is much, much smaller.

 

On another note, the link provided in WHMCS docs (http://docs.whmcs.com/PDF_Invoice) to the syntax pages is out of date.

 

The syntax of each function is here: http://www.tcpdf.org/doc/classTCPDF.html

 

 

If you are considering changing the pdf invoices, (its really quite easy) there are some good examples of just about everything you need here: http://www.tcpdf.org/examples.php

 

This page gives a pdf file of the result and the php source code.

 

regards,

 

Trevor

 

 

BTW, the standard core fonts you can use are:

• courier : Courier

• courierb : Courier Bold

• courierbi : Courier Bold Italic

• courieri : Courier Italic

• helvetica : Helvetica

• helveticab : Helvetica Bold

• helveticabi : Helvetica Bold Italic

• helveticai : Helvetica Italic

• symbol : Symbol

• times : Times New Roman

• timesb : Times New Roman Bold

• timesbi : Times New Roman Bold Italic

• timesi : Times New Roman Italic

• zapfdingbats : Zapf Dingbats

Link to comment
Share on other sites

  • WHMCS CEO

The reason it's the way it is, and how to change it manually, is explained in the docs: http://docs.whmcs.com/PDF_Invoice#Reducing_the_Filesize_of_PDFs But we can certainly add a setting for it though to make changing it easier in a future update.

 

The bulk of the file size of the PDFs that are generated by WHMCS come from the embedding of the font files for the UTF-8 character set. Because the UTF-8 charset has a large range of characters it supports, this means it takes up much more space than say the iso-8859-1 charset which unlike UTF-8, only supports A-Z 0-9 and other standard characters.

 

Therefore if you don't need all those special characters UTF-8 supports (ie. you don't have clients using those characters in their names/addresses) then you can reduce the filesize of PDF's quite considerably by ...

 

Continues @ http://docs.whmcs.com/PDF_Invoice#Reducing_the_Filesize_of_PDFs

Link to comment
Share on other sites

It's good to see all the feedback on this topic.

I would love to see the admin control feature so that I can set it once and then forget it!

 

Thanks Matt for your reply and considering this as a future improvement option.

 

Tim

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated