PDF Invoice size

tomtolo
tomtolo
Offline
0
Hello,
My PDF invoices are about 1,437 kB.
I use font: arial or dejavu sans (to get Polish characters)

Is there any way to reduce the size of created PDF Invoice?
Responses (3)
  • Accepted Answer

    Joan Vilà
    Joan Vilà
    Offline
    Friday, March 06 2015, 10:13 AM - #Permalink
    0
    Hello,

    Yes, then it has to be the font. Since it's a special font, the PDF library needs to include it in the file, that's why the big size.
    Dejà Vu is the only font that supports it. (the only one served with DOMpdf)
    if you have another font file that supports it, you can add it to the DOMpdf library and use that one, but I think you will have the same problem...

    There are a few sites out there about adding new fonts into DomPDF. This one in particular may be helpful to you: http://stackoverflow.com/questions/24412203/dompdf-and-set-different-font-family
    The reply is currently minimized Show
  • Accepted Answer

    tomtolo
    tomtolo
    Offline
    Thursday, March 05 2015, 03:17 PM - #Permalink
    0
    The logo image (.jpg) is only 6,5kB... so this is not the reason..
    Problem is in font that is used... when I switch to Helvetica size of the invoice is about 13kB.
    But I need polish special characters.. so Is there any other font (instead of Deja Vu) to support polish special characters?
    How to install additional font for PDF Invoices e.g. freesans?
    The reply is currently minimized Show
  • Accepted Answer

    Joan Vilà
    Joan Vilà
    Offline
    Wednesday, March 04 2015, 10:06 AM - #Permalink
    0
    Hello,
    There is no direct way to do this,
    but if you really need it, you might try to get rid of some parts of the PDF like the image or others you don't need.
    To do this all you need to do is modify the PDF template.
    You can find it at the Components->Invoice Manager->Templates->Click to edit invoices using plain text->PDF and email version tab.

    Let me know if that helps
    The reply is currently minimized Show
Your Reply