1

Hello,

I thought I'd share a bug and a solution in one post!

Links weren't working in Mac OS X Preview and Safari, at least on Mac OS X 10.4 (and possibly 10.5 from other reports I've read). They worked fine in the latest Adobe Reader for Mac, but most Mac users don't bother with Adobe Reader because PDF support is built-in.

To solve the problem, I tried replacing the html2pdf/_tcpdf/ directory with the latest version of tcpdf, but that caused a crash in Preview, and Adobe Reader only rendered part of the PDF before giving this error: "There was an error processing a page. Bad font object or font descriptor object." The PDF then disappeared, showing a blank white page!

After some trial and error replacing new versions of functions in _tcpdf/tcpdf.php with their older counterparts, I discovered the guilty party, which is the protected function _putfonts() !

So, to get links working:

1. Download the latest version of tcpdf from www.tcpdf.org
2. Rename the existing _tcpdf folder to _tcpdf_original
3. Add the latest version of tcpdf and name the directory _tcpdf
4. Copy the function called _putfonts() from _tcpdf_original/tcpdf.php
5. Paste it over the "_putfonts()" function in _tcpdf/tcpdf.php

And it should work!

Note: I haven't tested this extensively, so there may be unknown side effects. Don't deploy without testing thoroughly!