1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
========
HTML API
========
Supported @page properties and values
-------------------------------------
Valid @page properties:
::
background-image
size
margin, margin-bottom, margin-left, margin-right, margin-top
Valid size syntax and values:
::
Syntax: @page { size: <type> <orientation>; }
Where <type> is one of:
a0 .. a6
b0 .. b6
elevenseventeen
legal
letter
And <orientation> is one of:
landscape
portrait
Defaults to:
size: a4 portrait;
Supported @frame properties:
----------------------------
Valid @frame properties.
::
bottom, top, height
left, right, width
margin, margin-bottom, margin-left, margin-right, margin-top
To avoid unexpected results, please only specify
two out of three bottom/top/height properties, and
two out of three left/right/width properties per @frame object.
Supported CSS properties
------------------------
xhtml2pdf supports the following standard CSS properties
::
background-color
border-bottom-color, border-bottom-style, border-bottom-width
border-left-color, border-left-style, border-left-width
border-right-color, border-right-style, border-right-width
border-top-color, border-top-style, border-top-width
colordisplay
font-family, font-size, font-style, font-weight
height
line-height, list-style-type
margin-bottom, margin-left, margin-right, margin-top
padding-bottom, padding-left, padding-right, padding-top
page-break-after, page-break-before
size
text-align, text-decoration, text-indent
vertical-align
white-space
width
zoom
xhtml2pdf adds the following vendor-specific properties:
::
-pdf-frame-border
-pdf-frame-break
-pdf-frame-content
-pdf-keep-with-next
-pdf-next-page
-pdf-outline
-pdf-outline-level
-pdf-outline-open
-pdf-page-break
Defaults
--------
- The name of the first layout template is ``body``, but you better
leave the name empty for defining the default template (XXX May be
changed in the future!)
Tag-Definitions
---------------
pdf:barcode
~~~~~~~~~~~
Creates a barcode.
pdf:pagenumber
~~~~~~~~~~~~~~
Prints current page number. The argument "example" defines the space the
page number will require e.g. "00".
pdf:pagecount
~~~~~~~~~~~~~
Prints total page count.
pdf:nexttemplate
~~~~~~~~~~~~~~~~
Defines the template to be used on the next page. The name of the
template is passed via the ``name`` property and refers to a
``@page templateName`` style definition:
::
<pdf:nexttemplate name="templateName">
pdf:nextpage
~~~~~~~~~~~~
Create a new page after this position.
pdf:nextframe
~~~~~~~~~~~~~
Jump to next unused frame on the same page or to the first on a new
page. You may not jump to a named frame.
pdf:spacer
~~~~~~~~~~
Creates an object of a specific size.
pdf:toc
~~~~~~~
Creates a Table of Contents.
pdf:language
~~~~~~~~~~~~
Used for languages with right-to-left writing like Arabic, Hebrew, Persion etc. Right-to-left writing can be defined by passing the name via the ``name=""`` property.
::
<pdf:language name="arabic"/>
|