1====== dw2pdf Templates ======
2
3Templates define the design of the created PDF files and are a good way
4to easily customize them to your Corporate Identity.
5
6To create a new template, just create a new folder within the plugin's
7''tpl'' folder and put your header, footers and style definitions in it.
8
9===== Headers and Footers =====
10
11The following files can be created and will be used to set headers and
12footers on odd or even pages. Special headers/footers can be used on the
13first page of a document. If a file is does not exist the next more generic
14one will be tried. Eg. if You don't differ between even and odd pages,
15just the header.html is used.
16
17  * ''header.html'' -- Header for all pages
18  * ''header_odd.html'' -- Header for odd pages
19  * ''header_even.html'' -- Header for even pages
20  * ''header_first.html'' -- Header for the first page
21
22  * ''footer.html'' -- Footer for all pages
23  * ''footer_odd.html'' -- Footer for odd pages
24  * ''footer_even.html'' -- Footer for even pages
25  * ''footer_first.html'' -- Footer for the first page
26
27  * ''citation.html'' -- Citationbox to be printed after each article
28  * ''cover.html'' -- Added once before first page
29  * ''back.html'' -- Added once after last page
30
31You can use all HTML that is understood by mpdf
32(See http://mpdf1.com/manual/index.php?tid=256)
33
34If you reference image files, be sure to prefix them with the @TPLBASE@
35parameter (See [[#Replacements]] below).
36
37===== Replacements =====
38
39The following replacement patterns can be used within the header and
40footer files.
41
42  * ''@PAGE@'' -- current page number in the PDF
43  * ''@PAGES@'' -- number of all pages in the PDF
44  * ''@TITLE@'' -- The article's title
45  * ''@WIKI@'' -- The wiki's title
46  * ''@WIKIURL@'' -- URL to the wiki
47  * ''@DATE@'' -- time when the PDF was created (might be in the past if cached)
48  * ''@BASE@'' -- the wiki base directory
49  * ''@TPLBASE@'' -- the PDF template base directory (use to reference images)
50
51//Remark about Bookcreator//:
52The page depended replacements are only for ''citation.html'' updated for every page.
53In the headers and footers the ID of the bookmanager page of the Bookcreator is applied.
54  * ''@ID@'' -- The article's pageID
55  * ''@PAGEURL@'' -- URL to the article
56  * ''@UPDATE@'' -- Time of the last update of the article
57  * ''@QRCODE@'' -- QR code image pointing to the original page url (requires an online generator, see config setting)
58
59===== Styles =====
60
61Custom stylings can be provided in the following file of your dw2pdf-template folder:
62
63  * style.css
64
65You can use all the CSS that is understood by mpdf
66(See http://mpdf1.com/manual/index.php?tid=34)
67
68