[347] | 1 | # Html2Pdf Documentation
|
---|
| 2 |
|
---|
| 3 |
|
---|
| 4 | ## Documentation
|
---|
| 5 |
|
---|
| 6 | * [How to Install Html2Pdf](./install.md)
|
---|
| 7 | * [Basic Usage](./basic.md)
|
---|
| 8 | * [Page and Margin](./page.md)
|
---|
| 9 | * [Output](./output.md)
|
---|
| 10 | * [Barcode](./barcode.md)
|
---|
| 11 | * [Bookmark](./bookmark.md)
|
---|
| 12 | * [Font](./font.md)
|
---|
| 13 | * [SVG](./svg.md)
|
---|
| 14 | * [Electronic Signature](./cert.md)
|
---|
| 15 | * [Extensions](./extension.md)
|
---|
| 16 | * [Exceptions](./exception.md)
|
---|
| 17 | * [Useful Methods](./methods.md)
|
---|
| 18 | * [Tcpdf Methods](./tcpdf_methods.md)
|
---|
| 19 |
|
---|
| 20 | ## Recommandations
|
---|
| 21 |
|
---|
| 22 | * It is very important to provide valid HTML 4.01 to the converter, but only what is in the `<body>`.
|
---|
| 23 | * Use the `<page>` tag. Does not use the `<html>` or `<body>` tag.
|
---|
| 24 | * for borders: it is advised that they are like `solid 1mm #000000`
|
---|
| 25 | * for padding, they are applicable only on tags `table`, `th`, `td`, `div`, `li`
|
---|
| 26 | * A default font can be specified, if the requested font does not exist or if no font is specified: `$html2pdf->setDefaultFont('Arial');`
|
---|
| 27 | * The possibility to protect your PDF is present, CF Example 7.
|
---|
| 28 | * Some tests can be enabled (true) or disabled (false):
|
---|
| 29 |
|
---|
| 30 | * `setTestIsImage` method: test that images must exist
|
---|
| 31 | * `setTestTdInOnePage` method: test that the contents of TDs fit on one page
|
---|
| 32 |
|
---|
| 33 | * A DEBUG mode to know the resources used is present. It is activated by adding the following command just after the contructor (see Example 0): `$html2pdf->setModeDebug();`
|
---|
| 34 | * Some specific tags have been introduced:
|
---|
| 35 |
|
---|
| 36 | * `<page></page>` (CF Exemple 7)
|
---|
| 37 |
|
---|
| 38 | * Determines the orientation, margins left, right, top and bottom, the background image and the background color of a page, its size and position, the footer.
|
---|
| 39 | * It is also possible to keep the header and footer of the previous pages, through the attribut `pageset="old"` (see Example 3 & 4)
|
---|
| 40 |
|
---|
| 41 | * `<page_header></page_header>` (CF Example 3)
|
---|
| 42 | * `<page_footer></page_footer>` (CF Example 3)
|
---|
| 43 | * `<nobreak></nobreak>`
|
---|
| 44 |
|
---|
| 45 | * Used to force the display of a section on the same page.
|
---|
| 46 | * If this section does not fit into the rest of the page, a page break is done before.
|
---|
| 47 |
|
---|
| 48 | * `<barcode></barcode>` (CF Examples 0 & 9)
|
---|
| 49 |
|
---|
| 50 | * Can insert barcodes in pdfs, CF Examples 0 and 9
|
---|
| 51 | * the possible types of codebar are alls of TCPDF
|
---|
| 52 |
|
---|
| 53 | * `<qrcode></qrcode>` (CF Example 13)
|
---|
| 54 |
|
---|
| 55 | * can insert QRcode 2D barcodes
|
---|
| 56 | * (QR Code is registered trademark of DENSO WAVE INCORPORATED)
|
---|
| 57 |
|
---|
| 58 | * `<bookmark></bookmark>` (CF Examples 7 & About)
|
---|
| 59 |
|
---|
| 60 | * Can insert bookmark in pdfs, CF Example 7 and About.
|
---|
| 61 | * It is also possible to automatically create an index at the end of document (CF Example About)
|
---|
| 62 |
|
---|
| 63 | * `<end_last_page end_height="30mm"></end_last_page>` (CF Example 5)
|
---|
| 64 |
|
---|
| 65 | * css property `rotate`:
|
---|
| 66 |
|
---|
| 67 | * Values : 0, 90, 180, 270
|
---|
| 68 | * Works only on div (cf example 8)
|
---|