PDA

View Full Version : PDF generator cannot find font - Helvetica not found


breakdesign
15.05.2004, 20:50
Hi all!

I'm having a problem getting PDF's generated using the standard Mambo 4.5 PDF generator.

I get the error :
:exclaim: could not find a font in the Resources dictionary - using Helvetica instead.

It then exports a PDF document with all text on the same line.

What I think must be happening is that the /media/php_helvetica.afm and /media/helvetica.afm files are not being found. Thus the PDF generator doesn't have any metrics for the fonts, and renders incorrectly.

I have found references to a /font folder in the class.pdf.php - but haven't really wanted to change anything, since I guess this is something that should work without too much hassle?

Oh, this worked fine on my dev server (windows xp / apache2) - but got the error once i moved over to linux / apache1.3 - i guess it uses your installed fonts on the system with win xp.

I also have the /media directory as CHMOD 776 - if that is of any help?

:icarrow: Your thoughts on this will be appreciated! I know it must be something really simple, but just cant seem to get it working!

Have a cool weekend!

Stefan

Cape Town, South Africa

manni
16.05.2004, 04:45
Hmm, now that you mention it, i had the same problem, but didn't look into it, i just began to use HTMLdoc, this works like a charm and creates really good looking PDFs and can handle gif/jpg/png. I also hav developed a hack of the original pdf.php to better support HTMLdoc. I will not take the eay back, and use the ezpdf anymore, HTMLdoc is so much better

breakdesign
17.05.2004, 02:57
Manni Thanks!

Will give it a try, I need support for images anyway!

Is the hack you did available anywhere? What did you need to modify?

Stefan

manni
17.05.2004, 11:14
you can get it on mosforge (http://mosforge.com/projects/htmldoc)
you will need this if you are on a shared host, binaries are also available, read the README file for requirements. If have your own server, simply compile and install HTMLdoc, and it will work.

breakdesign
18.05.2004, 23:15
Hi Manni!

:icarrow: Currently uploading! Will see how it goes! Thanks for the advice - also finally discovered mosforge properly :exclaim: it's great!

Stefan

ps. apparently the problem lies on the server itself, some library needs to be installed on the server - don't know how to embed threads, but it's under Mambo How Do I? also posted by me.

moosecat
10.12.2005, 15:54
Quick hack is to change the dir in openFont($font) of class.pdf.php to where your fonts are... or of course move your fonts to the ./media/ directory.

Sean