xref: /plugin/dw2pdf/tpl/default/README.txt (revision 7246765fc5163fd7cdb920f4e1c6082245a26edf)
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  * ''@TITLE@'' -- The article's title
41  * ''@WIKI@'' -- The wiki's title
42  * ''@WIKIURL@'' -- URL to the wiki
43  * ''@DATE@'' -- time when the PDF was created (might be in the past if cached)
44  * ''@BASE@'' -- the wiki base directory
45  * ''@TPLBASE@'' -- the PDF template base directory (use to reference images)
46
47//Remark about Bookcreator//:
48The page depended replacements are only for ''citation.html'' updated for every page.
49In the headers and footers the ID of the bookmanager page of the Bookcreator is applied.
50  * ''@ID@'' -- The article's pageID
51  * ''@PAGEURL@'' -- URL to the article
52  * ''@UPDATE@'' -- Time of the last update of the article
53  * ''@QRCODE@'' -- QR code image pointing to the original page url
54
55===== Styles =====
56
57Custom stylings can be provided in the following file:
58
59  * style.css
60
61You can use all the CSS that is understood by mpdf
62(See http://mpdf1.com/manual/index.php?tid=34)
63
64