Hi,
I have a problem with all font except the ones provided as .afm with domPDF.
I have to parse the uncompressed pdf output to change some values (like page number, table of content, etc). When using the provided .afm fonts, everything work. But when i use .ttf, the resulting text output is strange. Every characters are separeted by an uncommon symbol. In notepad++, it's black square with 2 numbers in.
So, I can't parse correctly the pdf. Note that it only affects the text of the pdf not the pdf meta-data.
As said previously, it's my workaround for per-page header/footer and table of contents.
Is it normal? Any way to solve that?
You can get the same effect if you do something like:
$pdfData = $this->pdf->output(array('compress' => 0));
/* Here is the parsing */
header('Content-disposition: attachment; filename=' . $filename . '.pdf');
header('Content-type: application/pdf');
header('Content-Length: ' . strlen($pdfData));
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
echo $pdfData;