toplakd Posted November 22, 2021 Posted November 22, 2021 Today I came across new problem, my Carrier added an option where I have to upload the Invoice (proforma invoice) when creating shipping order. However, the generated PDF from thirty bees is too big as they have maximum size limit. Is there an option to make some override for the PDF output quality? Thank you. Dejan
0 datakick Posted November 22, 2021 Posted November 22, 2021 One of the reasons the pdf can be so huge is the used font. You can tweak used fonts in file classes/pdf/PDFGenerator.php, property $font_by_lang. For example, deleting line 'en' => 'dejavusans' Can reduce pdf size from 461K to 15k. Of course, the resulting pdf might look different. Or completely broken, if your language contains weird characters such as 'příliš žluťoučký kůň' 1 1
0 toplakd Posted November 22, 2021 Author Posted November 22, 2021 (edited) Thank you for your quick answer. As I already have override on that file due to encoding error for Slovenian language ( 'sl' => 'dejavusans',) so I just made additional change for english language to helvetica ('en' => 'helvetica',) and that reduced the english generated PDF from 501k to 45k. Thank you quick solution, that was all I needed. 30 minutes ago, datakick said: 'příliš žluťoučký kůň Didn't spot one yet 🙂 Edited November 22, 2021 by toplakd
Question
toplakd
Today I came across new problem, my Carrier added an option where I have to upload the Invoice (proforma invoice) when creating shipping order.
However, the generated PDF from thirty bees is too big as they have maximum size limit.
Is there an option to make some override for the PDF output quality?
Thank you.
Dejan
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now