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