Closed (fixed)
Project:
Printer, email and PDF versions
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2011 at 10:19 UTC
Updated:
20 Sep 2013 at 20:09 UTC
Is it possible to have the fonts-cache in the files folder instead of in /libraries/dompdf/lib/fonts?
Comments
Comment #1
PhenX commentedSure, all you need is to change the value of the DOMPDF_FONT_DIR constant in /libraries/dompdf/dompdf_config.custom.inc.php (dompdf 0.6) or /libraries/dompdf/dompdf_config.inc.php (dompdf 0.5)
Comment #2
jcnventuraLike PhenX said, you can do this yourself like that.. Don't forget to turn off the module's auto-configuration.
The module can't auto-configure this, as there are dompdf-provided fonts in lib/fonts which would have to be moved when installing dompdf instead of simply granting write access to those directories.
Comment #4
yevgeny.ananin commentedI know this thread is old, but I figured I'd ask anyway. I tried following the instructions above by modifying the DOMPDF_FONT_DIR constant to be my files folder: /sites/default/files. Now when I generate the PDF, I get a list of errors:
-Notice: Undefined index: serif in Font_Metrics::get_font() (line 168 of
-Warning: Invalid argument supplied for foreach() in Font_Metrics::get_font() (line 168 of
-.....
What should I have set the value to?