Is it possible to have the fonts-cache in the files folder instead of in /libraries/dompdf/lib/fonts?

Comments

PhenX’s picture

Sure, 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)

jcnventura’s picture

Status: Active » Fixed

Like 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

yevgeny.ananin’s picture

I 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?