DOMPDF 0.5.1 - Fonts not working on live Server
I've got DOMPDF 0.5.1 r开发者_StackOverflow社区unning in a Drupal implementation on my localhost (xampp, windows 7) which generates my Pdf's just fine. But when i commit this to the live server things go wrong. I get the error: "The font "Futura" contains a bad /BBox" And all text is displayed as dots.
Any idea what might be going on?
The user who starts your webserver i.e. httpd or apache must have read/write access to the font folder as well, that might cause the problem.
Give your webserver write permission on the path specified in DOMPDF_FONT_DIR (lib/fonts by default). Under *nix, ideally you can make the webserver group the owner of this directory and give the directory group write permissions. For example, on Debian systems, Apache runs as the www-data user:
$ chgrp www-data lib/fonts
$ chmod g+w lib/fonts
If your user is not a member of the www-data group or you do not have root privileges, you can make the directory world writable and set the sticky bit:
$ chmod 1777 lib/fonts
http://code.google.com/p/dompdf/wiki/Installation
精彩评论