I use PHP and TCPDF to create utf8 encoded online accounts. I created the font definition files following the tutorial on the tcpdf website using the PT-sans.ttf file.
The generated PDF files look great (accents are displayed correctly) when opened using Adobe Reader. But as soon as you open the PDF file using Adobe Illustrator, you will see a combination of ordinary ascii characters and characters with missing characters. When you open gmail as an attachment in the preview, the text does not appear at all, only images are displayed.
I also get incompatible behavior with a Foxit reader. This was normal on one computer (with the font installed), but damaged on another (without the font installed).
Illustrator (left) and Foxit reader: http://dl.dropbox.com/u/14647415/illustrator%20and%20foxit.jpg
Here is a copy of the damaged file: http://dl.dropbox.com/u/14647415/2011040-3.pdf
The PDF size is ± 200K, so the font seems to be inserted correctly.
This is similar to any utf8 font embedded in the procedure described on the tcpdf website. When I tried the basic cid fonts that came with the tcpdf library, did you have missing characters with an accent or were replaced by ?, but the top layout and text were fine in Illustrator. Attached utf-8 fonts, such as Dejavusans, also appear to be damaged.
I use 'UTF-8' as a parameter passed to the tcpdf constructor.
XTCPDF class extends TCPDF {
function __construct(){ parent::__construct('P', 'mm', 'A4', true, 'UTF-8', false); ... } ...
}
Do you have any idea what might be causing this?
Thank you in advance.
R.