From f810aa0651d1c72047f72e30be1d96ce3bbd46e8 Mon Sep 17 00:00:00 2001 From: moka-dev <59028680+moka-dev@users.noreply.github.com> Date: Sun, 23 Mar 2025 15:26:28 +0100 Subject: [PATCH 1/3] support for specific headers / footers per dokuwiki page (ns & bookcreator) adds support for setting specific headers and footers for each logical DokuWiki page by using named @page styles and corresponding blocks. Each page is wrapped in a with a matching @page pageX CSS rule that defines the appropriate header and footer names. All named headers and footers are defined before to start html. also adjusted how pagebreak are handled, because mPDF automatically inserts a page break before any new div with a different page style. --- action.php | 241 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 170 insertions(+), 71 deletions(-) diff --git a/action.php b/action.php index 1b66573..1d801b1 100644 --- a/action.php +++ b/action.php @@ -14,9 +14,10 @@ * Export html content to pdf, for different url parameter configurations * DokuPDF which extends mPDF is used for generating the pdf from html. * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Luigi Micco - * @author Andreas Gohr + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Luigi Micco + * @author Andreas Gohr + * @author Josquin Dehaene */ class action_plugin_dw2pdf extends ActionPlugin { @@ -26,13 +27,21 @@ class action_plugin_dw2pdf extends ActionPlugin * @var array */ protected $exportConfig; - /** @var string template name, to use templates from dw2pdf/tpl/