I have to print an html document (one or more pages) with header and footer and then some images without any header/footer.
Source is like:
<div class="fixed-header">HEADER</div>
<div class="fixed-footer">FOOTER</div>
<table>
<thead><tr><td><div class="page-header-space"></div></td></tr></thead>
<tbody><tr><td>
HTML BODY (could be long)
<br style="page-break-after: always">
IMAGES (to print without header and footer)
<td></tr></tbody>
<tfoot><tr><td><div class="page-footer-space"></div></td></tr></tfoot>
</table>
I need to call print() only one time, I can't ask to the user to print every document separately.
I can alter the code as I like, I can move HTML outside table and also alter HTML from PHP. It is difficult to know the number of pages before print because i don't know the paper size.
Any ideas?