I am using tcpdf_5.0.002 and the only utf8 supported font is freeserif and when I use it my PDF file is around 1MB in size even when empty or a few words are displayed. If I don't use freeserif font size is 50kb, but I must use UTF8 characters. Is there any way to reduce that size of PDF (maybe use only Subset)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have read and tried lots of things but the result is never correct (if utf8 chars show then size is large, if size is small, utf8 chars are not shown). I don't know what am I doing wrong. This is what I have now, should I change something?
We are attempting to migrate to FrontAccounting and after realizing, UTF-8 was not the default (one of those wtf!? moments), we changed it as instructed.
After UTF-8, Invoice pdf file size ballooned from 12.6 KiB to 526.9KiB. (same invoice, btw) and invoice looks like crap with all the � in it.
As you can probably understand, this is not acceptable size for a simple Invoice because we have to email every Invoice to our clients.
Any ideas, how to fix this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using tcpdf_5.0.002 and the only utf8 supported font is freeserif and when I use it my PDF file is around 1MB in size even when empty or a few words are displayed. If I don't use freeserif font size is 50kb, but I must use UTF8 characters. Is there any way to reduce that size of PDF (maybe use only Subset)?
Yes you can. See http://www.tcpdf.org/fonts.php
I have read and tried lots of things but the result is never correct (if utf8 chars show then size is large, if size is small, utf8 chars are not shown). I don't know what am I doing wrong. This is what I have now, should I change something?
And the problem is only with 1 character. Is there any way to manually add some code to include that letter?
Last edit: SilverSilencer 2015-05-22
Have you tried setting the font like this:
I tried like this but some utf8 characher still doesn't work.
I have now found this website fonts.snm-portal.com where I can insert font and use that and it works great. So for now I will use this. :)
We are attempting to migrate to FrontAccounting and after realizing, UTF-8 was not the default (one of those wtf!? moments), we changed it as instructed.
After UTF-8, Invoice pdf file size ballooned from 12.6 KiB to 526.9KiB. (same invoice, btw) and invoice looks like crap with all the � in it.
As you can probably understand, this is not acceptable size for a simple Invoice because we have to email every Invoice to our clients.
Any ideas, how to fix this?