Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 3.0.0
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Blesta uses TCPDF to render PDF documents. One problem with this is that in order to support the widest range of characters as possible, Blesta defaults to using the dejavusans font. Due to the architecture PDF, UTF-8 fonts must be embedded within the document, and this results in much larger sized documents.
TCPDF has a feature (in version 6.0.072, possibly older), that allows embedding only characters in the document that are used within the document (part of TCPDF::SetFont(); $subset parameter). However, TCPDF is a monstrosity (24K lines of code, 870 KB+ single file) that may cause more problems than it solves.
One of two things that can be done:
- Update TCPDF to take advantage of this feature.
- Switch to a different PDF rendering library. ZendPDF may be an option, though it doesn't look very good.
One possible other option, though I'd hate to do this, is to patch our existing vendor copy of TCPDF to include the partial embed font feature.