On Jun 26, 10:49 am, dodi <
diogo.jac...@gmail.com> wrote:
> Hi guys,
>
> I know gd-output is under development, I'm trying to use a JPEG
> output, I've redefined the constant DOMPDF_PDF_BACKEND in
> dompdf_config.inc.php to gd
>
> I'm getting the following error:
>
> Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename
> in D:\phproot\wwwroot\web_framework\dist\dompdf\include
> \gd_adapter.cls.php on line 613
>
> Does anybody have an idea, why this is occurring?
imagettfbbox() requires a valid font file, which is not included in
the distribution of DOMPDF for the base14 fonts (since they are
supported internally by readers per the PDF specification). You have
two options:
1) Copy the appropriate font files for the base14 fonts to dompdf/lib/
fonts.
2) Add a new font to your installation using load_font.php and specify
that as the font for any text in your document.
GD support isn't likely to see too much work in the near term, you may
have better luck creating a PDF and then converting to an image
format. GhostScript can do this for you.