using gd-adapter

54 views
Skip to first unread message

dodi

unread,
Jun 26, 2009, 10:49:10 AM6/26/09
to dompdf
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

Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename
in D:\phproot\wwwroot\web_framework\dist\dompdf\include
\gd_adapter.cls.php on line 597

Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename
in D:\phproot\wwwroot\web_framework\dist\dompdf\include
\gd_adapter.cls.php on line 597

Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename
in D:\phproot\wwwroot\web_framework\dist\dompdf\include
\gd_adapter.cls.php on line 613

Warning: imagettfbbox() [function.imagettfbbox]: Invalid font filename
in D:\phproot\wwwroot\web_framework\dist\dompdf\include
\gd_adapter.cls.php on line 613

Warning: imagettftext() [function.imagettftext]: Invalid font filename
in D:\phproot\wwwroot\web_framework\dist\dompdf\include
\gd_adapter.cls.php on line 556

Does anybody have an idea, why this is occurring?

BrianS

unread,
Jun 26, 2009, 11:12:29 AM6/26/09
to dompdf
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.
Reply all
Reply to author
Forward
0 new messages