1

hi
at first: nice tool smile
i have some questions:
1. with what css-proberties and html-tags can html2pdf work? is there a list?
2. when i want to generate a pdf it is not possible at first to open the file. when I opten the pdf file with a hexeditor the first letters of the file are "2 J %PDF ........" (Hex: "32 20 4a 0a ...."). when I delete them it's possible to open the file with a pdf viewer. but where does the "2 J " come from?
this is the source of my php-file:
<?php
$content = "<html><body>test€öäÄö</body></html>";
require_once(dirname(__FILE__).'/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','en');
$html2pdf->WriteHTML($content);
$html2pdf->Output('exemple.pdf');
?>


thx in advance

2

hi !

1. here is the list : http://html2pdf.fr/_html2pdf/exemples/pdf/about.pdf it is the "about" example in the zip file.

2. have you also the "2 J " with the examples ? do you use HTML2PDF alone ? or in a framework ?


Ancien pseudo : lolo

3

this is really interesting .... your pdf file which you linked has the same letters at first .... and so on i tried it with the examples which are in zip file.
i tried it alone without a framework.

so for information: i am using linux and not the original adobe acrobat reader.

4

woaw, you are right ?! on my server too ?! i'll search where it comes from !
Ancien pseudo : lolo

5

I looked a little bit .....


because $cap is set "square" the SetLineStyle() function of tcpd-class adds "2 J " into the buffer ...
so: the $ca array is not right/ is the cause.

in the constructor of MyPDF constructor calls SetLineStyle() ... so I think somewhere there is the bug ....
so on the MyPDF cunstructor was called 2 times in a row , but I fount only one "new MyPDF(...".... strange
(i made a echo in the cunstructor and a echo into the TCPDF->setBuffer() method and wrote everytime the $this->buffer var on the screen)

6

ap' => 'square'));ok, it s beceause $this->SetLineStyle(array('c is call before any page is set... i have to move it after the set of the first page.
Ancien pseudo : lolo

7

here is the patch :
version : 4.00
file : mypdf.class.php
line : 30
replace :
$this->SetLineStyle(array('cap' => 'square'));
by :
$this->linestyleCap = '2 J';
Ancien pseudo : lolo

8

great thx ^^ i will try it wink