1


Bonjour:

Alors que le PDF est construit a besoin de savoir que la position que je suis pdf, parce que parfois j'ai besoin de passer à une nouvelle page. Je sais qu'une partie de ce code? comme cela peut se produire dans une certaine position PDF afin de créer une nouvelle page?

Merci,
Jac

2

you can speak in english, it would be easier...
Ancien pseudo : lolo

3

Hi:

I want to know, while pdf is building, the position in the pdf page because sometimes I have to pass to another pdf page.

I have next code:

"
<table>
<!- BEGIN PART 1->
<tr class="GroupCaption">
<td >{name_category} </td>
</tr>
<tr class="Caption">
<td >{res:Especie} </td>
<th >{res:Formato} </th>
<th >{res:Altura} </th>
<th >{res:Calibre} </th>
<th >{res:Observaciones} </th>
<th >{res:Precio}</th>
</tr>
<!- END PART 1->
<!- BEGIN PART 2->
<tr >
<td>{name_product} </td>
<td>{format_product} </td>
<td >{height_product} </td>
<td >{caliber_product} </td>
<td >{observations} </td>
<td s>{price_product} </td>
</tr>
<!- END PART 2->
</table>
"

This code is executed several times and then is converted to pdf. Sometimes "part 1" is at the end of the pdf page so I want to cut the page and create another new pdf page and continue converting. Is it possible? Anyone has an idea?

Thank you very much,
Jac

4

try to use "<nobreak>" (see the example 7)
Ancien pseudo : lolo

5

Hi spipu, thank you for your fast answer.

If I use:
<table>
<!- BEGIN PART 1->
<nobreak>
<tr class="GroupCaption">
<td >{name_category} </td>
</tr>
<tr class="Caption">
<td >{res:Especie} </td>
<th >{res:Formato} </th>
<th >{res:Altura} </th>
<th >{res:Calibre} </th>
<th >{res:Observaciones} </th>
<th >{res:Precio}</th>
</tr>
</nobreak>
<!- END PART 1->
<!- BEGIN PART 2->
<tr >
<td>{name_product} </td>
<td>{format_product} </td>
<td >{height_product} </td>
<td >{caliber_product} </td>
<td >{observations} </td>
<td s>{price_product} </td>
</tr>
<!- END PART 2->
</table>
"

is not working, next error appears several times:

"
Notice: Undefined offset: 0 in .........................../html2pdf.class.php on line 2770

Notice: Undefined index: td_y ............................./html2pdf.class.php on line 2774
"

thank you very much,
Jac

6

ah ok, you want that the 2 firsts lines would not be separated.

try to add a new colonne with a rowspan of 2, on the right of the 2 lines
Ancien pseudo : lolo

7

Hi:

Thank you very much Spipu. It's working perfectly.

The last question:

- Like I told you before, previous code is executed several times. Part 1 always has the same size ( 2 rows) but Part 2 sometimes is longer and sometimes is shorter. The problem is that I dont want to have only part 1 at the end of pdf page, at least Part 1 must be together with one or two rows of part 2.

Do you have any idea how to do it?

Thank you very much,
Jac

8

you use a rowspan of 3 instead of 2 wink
Ancien pseudo : lolo

9

Great!!!!

Spipu, thank you for your answers and for your scripts.

Best Regards,
Jac