I'm using HTML2PDF (http://html2pdf.fr/) to generate PDF files from a webpage. However, I'm having a kind of weird error: the generated file can be perfectly shown with the "Preview" Mac tool (or simply touching the space bar when the downloaded PDF file is selected), but when I try to open the file with the Adobe Acrobat Pro, the following error message appears:
Adobe reader could not open "file.pdf" because it is either not a support file type or because the file has been damaged (for example, it was sent as email attachment and was'nt correctly decoded).
Here is how I'm generating the PDF content and the PDF file itself:
$content = '<page backtop="12mm" backbottom="12mm" backleft="8mm" backright="8mm" style="font-size: 10pt;">
<h1>MyTitle</h1>
<br>
<table style="width: 100%;">
<tr>
<td style="width: 25%;"></td>
....
</tr>
</table>
</page>';
$html2pdf = Yii::app()->ePdf->HTML2PDF('P','A4','en',true,'utf-8');
$html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->WriteHTML($content);
$html2pdf->Output($outputname , EYiiPdf::OUTPUT_TO_DOWNLOAD );
Any idea on what can be happening? Maybe I'm missing something about the format or the file encoding? I've tried different encodings but nothing seems to solve the problem...
Thanks in advance for your time and effort! :)