0

I am trying to run:

php load_font.php montserrat ./Montserrat-Bold.otf

(as per described here: Custom Fonts for DOMPDF)

But it results in the following error:

Warning: require_once(/Applications/MAMP/htdocs/project/wp-content/themes/project/vendor/dompdf/dompdf/lib/php-font-lib/classes/Font.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/project/wp-content/themes/project/vendor/dompdf/dompdf/dompdf_config.inc.php on line 332

Fatal error: require_once(): Failed opening required '/Applications/MAMP/htdocs/project/wp-content/themes/project/vendor/dompdf/dompdf/lib/php-font-lib/classes/Font.php' (include_path='.:/Applications/MAMP/bin/php/php5.5.14/lib/php') in /Applications/MAMP/htdocs/project/wp-content/themes/project/vendor/dompdf/dompdf/dompdf_config.inc.php on line 332

Why??

Community
  • 1
  • 1
FooBar
  • 5,752
  • 10
  • 44
  • 93
  • Why?? Because the file doesn't exist where you say it does. The error is very self-explanatory. ;-) – Jay Blanchard Mar 17 '15 at 21:47
  • How did you get dompdf? The source code [does not include php-font-lib](http://stackoverflow.com/search?q=dompdf+font+class), and if you're using Composer you should set `DOMPDF_ENABLE_AUTOLOAD` to false in the config file (dompdf_config.inc.php). – BrianS Mar 24 '15 at 02:06

0 Answers0