1# DokuWiki-Plugin: PDF-Tools
2
3DokuWiki-plugin which offers addition functionality for the dw2pdf-plugin.
4
5## Features
6
7* Optional and configurable slider button to chose a template for pdf-generation
8* Configurable pdf-generate button which can be placed in a page
9* A set of templates for different purposes which can be installed directly from the admin section
10* Upload your own templates in the admin section and option to remove templates
11* Additional wrap-containers and some additional syntax for formatting
12* Additional replacements which can be used in the templates
13
14
15## Print Button
16
17Activate a print button (slider) which ist shown a the bottom right of the screen. You can configure the templates which are the display and can be chosen in order to generate a pdf.
18
19![](img/screenshot2.png)
20
21![](img/screenshot1.png)
22
23
24## Inline pdf button
25
26Use the ```<pdf>-Tag``` in a document to create an inline button. Pressing this button will generate a pdf with the defined template. Syntax:
27
28    <pdf template-name>
29    <pdf template-name quer>
30
31The option ```quer``` creates the pdf in landscape orientation (german word "quer" = horizontal)
32
33Standard parameters for the created pdf are
34* toc = 0 (no table of content)
35* tpl = ```template-name```
36* orientation=landscape (if the keyword ```quer``` is used)
37
38
39## etikett-Tag
40
41    <etikett>
42
43Inserts an image which is meant for printed documents, where a sticker is to be pasted on.
44
45![](img/etikett.png)
46
47
48## Additional wrap containers
49
50If you have the wrap-plugin installed, you can use these addition classes:
51
52    <WRAP maxtabelle>
53    Table ist set to 100% width = same as tablewidth-option
54    | Content | Another content |
55    </WRAP>
56
57    <WRAP formular>
58    Table without borders
59    | Example | Okay |
60    </WRAP>
61
62    <WRAP formular2>
63    Table with border only on the bottom of the lines
64    | Another example | Test |
65    </WRAP>
66
67    <WRAP platz>
68    Increases the padding of cells in a table
69    | Test |
70    | Test |
71    </WRAP>
72
73    <wrap bigtext>Text scaled to 115%</wrap>
74
75    <wrap smalltext>Text scaled to 90%</wrap>
76
77## Create spaces in empty table cells
78
79Vertical space
80
81    | <abstand1> | Test |
82    | <abstand2> | Test |
83    | <abstand3> | Test |
84
85Horizontal space
86
87    | Test | <quer1> | <quer2> | <quer3> |
88
89
90## Set of templates
91
92The pdftools-plugin contains a set of templates which can be installed in the admin section. These templates contain additional replacements:
93
94    @AUTHOR@ - Name of the author
95    @COMPANY@ - Name of the company which can be configured
96    @APPROVER@ - Name of the approve (requires Approve- und ApprovePlus-Plugin)
97
98## Upload pdf-templates
99
100Upload form for uploading your own pdf-templates.
101
102The template files must be placed in a directory, which must bei included in the zip-file. The files are extracted directly into the ```dw2pdf/tpl``` directory. This feature depends on the Linux ```unzip``` programme to work.
103
104## Erase pdf-templates
105
106Button to delete templates from dw2pdf.
107
108## Ideas for coming versions
109* online template editor or a configurable template, where setting can be made in the wiki
110* configurable GET-Parameters for the ```<pdf>```-Tag and the slider
111
112## Compatibility
113
114Tested with
115* PHP **7.3**
116* Dokuwiki / **Hogfather**
117* [Approve-Plugin](https://www.dokuwiki.org/plugin:approve) / **2021-02-17**
118* [dw2pdf / Modified Version](https://github.com/practical-solutions/dokuwiki-plugin-dw2pdf) / **2020-09-16**
119* [ApprovePlus-Plugin](https://github.com/practical-solutions/dokuwiki-plugin-approveplus) / **2020-11-23**
120