HTML2PDF生成损坏的文件

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! :)

Solved! After dealing with this a little bit more, I've decided to open the PDF file with a plain text editor, and I've found that the PHP page used to generate the file included by default a header and a footer (I'm using the Yii Framework), which resulted in "printing" the HTML header and footer code in the PDF file... Is anyone ever has the same problem I had, the way to solve it is to open the page's controller file (in 'protected/controllers/myPageController.php') and change the following line:

$this->render('index');

By this one:

$this->renderPartial('index');

Everything works as expected now! ^_^