xref: /plugin/dw2pdf/tpl/default/README.txt (revision 16ce23ac02019314e1585f5b8b8653072465431c)
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_odd.html'' -- Header for odd pages
18  * ''header_even.html'' -- Header for even pages
19  * ''header_first.html'' -- Header for the first page
20  * ''header.html'' -- Header for all pages
21  * ''footer_odd.html'' -- Footer for odd pages
22  * ''footer_even.html'' -- Footer for even pages
23  * ''footer_first.html'' -- Footer for the first page
24  * ''footer.html'' -- Footer for all pages
25  * ''citation.html'' -- Citationbox to be printed after each article
26
27You can use all HTML that is understood by mpdf
28(See http://mpdf1.com/manual/index.php?tid=256)
29
30If you reference image files, be sure to prefix them with the @TPLBASE@
31parameter (See [[#Replacements]] below).
32
33===== Replacements =====
34
35The following replacement patterns can be used within the header and
36footer files.
37
38  * ''@PAGE@'' -- current page number in the PDF
39  * ''@PAGES@'' -- number of all pages in the PDF
40  * ''@ID@'' -- The article's pageID
41  * ''@TITLE@'' -- The article's title
42  * ''@PAGEURL@'' -- URL to the article
43  * ''@WIKI@'' -- The wiki's title
44  * ''@WIKIURL@'' -- URL to the wiki
45  * ''@UPDATE@'' -- Time of the last update of the article
46  * ''@DATE@'' -- time when the PDF was created (might be in the past if cached)
47  * ''@BASE@'' -- the wiki base directory
48  * ''@TPLBASE@'' -- the PDF template base directory (use to reference images)
49
50===== Styles =====
51
52Custom stylings can be provided in the following file:
53
54  * style.css
55
56You can use all the CSS that is understood by mpdf
57(See http://mpdf1.com/manual/index.php?tid=34)
58
59