From: Dan Brown Date: Tue, 14 May 2024 12:36:57 +0000 (+0100) Subject: Documented export class functionality X-Git-Url: http://source.bookstackapp.com/website/commitdiff_plain/370d5811724b1bd3f22957535d0154dd364259a8 Documented export class functionality Closes #140 --- diff --git a/content/docs/admin/hacking-bookstack.md b/content/docs/admin/hacking-bookstack.md index 252cdcf..5a07821 100644 --- a/content/docs/admin/hacking-bookstack.md +++ b/content/docs/admin/hacking-bookstack.md @@ -96,4 +96,27 @@ As an example of usage, pages with the tag `Priority: Critical` could have their +``` + +--- + +### Export Classes + +When PDF or HTML exports are performed in BookStack, the underlying templates define classes to allow customization of styling in specific scenarios. +For context, PDF exports are rendered via a conversion from HTML to PDF, so CSS styling can be applied for these but support may depend on the underlying PDF conversion engine. +The classes are applied to the `` element, and are as follows: + +- `export` - All HTML/PDF exports +- `export-format-pdf` - PDF exports +- `export-format-html` - HTML exports +- `export-engine-dompdf` - PDF exports using the default DomPDF rendering engine +- `export-engine-wkhtml` - PDF exports using the default DomPDF rendering engine +- `export-engine-command` - PDF exports using the command-based PDF rendering option + +As an example usage, you could define the following custom style code to make paragraph text red only in PDF exports created via the default DomPDF renderer: + +```html + ``` \ No newline at end of file