Extension:PDFCreator
![]() | This extension is mainly supported in an external venue: BlueSpice Community Forum. If you need help, you should post there, and not on the talk page. |
![]() Release status: stableCategory:Stable extensions |
|
---|---|
![]() |
|
Description | Creates PDF files from wiki pages |
Author(s) | Hallo Welt! GmbH |
Maintainer(s) | Hallo Welt! GmbH |
Latest version | 4.5 |
Compatibility policy | For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension.Category:Extensions with long-term support release branches compatibility policy |
MediaWiki | 1.39 (LTS)Category:Extensions with manual MediaWiki version |
License | GNU General Public License 3.0 only |
Download | Category:Extensions in Wikimedia version control |
Translate the PDF Creator extension if it is available at translatewiki.net |
![]() |
PDF Creator allows users to export wiki content to professionally styled PDF documents. It supports both individual pages and multi-page exports (books).
Usage / features
- Pages can be exported individually or together with subpages or linked pages.
- Users can choose between different templates for their PDF layout (e.g., with or without cover sheets).
- PDF export is available directly from the page tools menu via an intuitive export dialog.
- Content droplets allow users to add quick-export links or previews directly on a page.
- Templates are customizable, including headers, footers, styles, and metadata.
- The Orgininal Wikipage before export
- The Exported Wikipage using PDF Creator
Installation
- Download and move the extracted
PDFCreator
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PDFCreator
- Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'PDFCreator' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Exporting a page or a book
To print a page to PDF, click on the page-icon in the page tools. This opens the export dialog field. dialog with dropdown menus for selecting export mode and template

Select the export settings.
- Mode:
- Page: Prints the page.
- Page with subpages: Prints the page and all its subpages. This option is only shown if the page has subpages.
- Page with linked pages: Prints the page and the pages that are linked directly from this page
- Template:
- StandardPDF: This prints the page or pages without a cover sheet (unless the template has been edited).
- StandardBookPDF: This adds a cover sheet to the PDF (unless the template has been edited).
Whether linked pages should be considered in the PDF export is defined in the chosen export template.
By default, the template StandardPDF shows the wiki's logo (from the skin settings page). If there are no custom settings, the default BlueSpice logo is used.
Exporting media links
By default, media links (=links that point directly to the file on the server) will add an attachment to the exported PDF File. This is independent of the chosen export mode (Page, Page with linked pages).
This is also true for PDF files that are embedded via Content Droplet PDF preview.
If no attachments should be added, this has to be defined in the Properties of the PDF template.
Exporting pages with linked pages
When pages are exported with their linked pages, link types are processed as follows:
- Media links will add an attachment to the exported PDF File
- File links are clickable and forward to the corresponding file page
- Mentions are clickable and forward to the user page
If no attachments should be added, this has to be defined in the Properties of the PDF template.
If no links to pages that are not included in the PDF should be added, this has to be defined in the Properties of the PDF template.
Adding a new template
By default, the wiki provides two PDF templates:
- StandardPDF: Template without a cover page for the single-page export.
- StandardBookPDF: Template with a cover page for the book export.
Starting with BlueSpice 5.1, PDF templates can be created from the page Special:PDF templates.
Copy an existing template
To create a new PDF template:
- Go to the page Special:PDF_templates.
- Copy an existing template.
special page "PDF templates" with selected standard book pdf to be copied

- Enter a name for the new template.
- Click Copy.
Click Edit template to start customizing your template. PDF templates page with the edit link of the new template

Select general template properties
- Select the page orientation and the general export properties (for example, whether to show the Table of Contents for each page or whether to include links to pages that are not exported in the PDF itself).
- Click Next.
Select the template elements
Select the checkboxes for each element you want to include in your template:
- Header: Page header for the template pages
- Footer: Page footer for the template pages
- Document preface: Cover page
- Document appendix: Additional page that is added at the end of the pdf. It is formatted like the content pages (with header and footer) and adds to the PDF page count.
Click Configure for each template element to design the layout.
Configure the header
The header elements can consist of a header image (usually your logo) and some text (which can be a combination of predefined parameters and your own text). Edit dialog for the header section

If you want to show an image that is different from your wiki logo, you can select "Use custom logo" and enter an existing image name or upload a new image.
Configure the footer
By default, the wiki provides localization system messages for each footer section. Use system messages if you want to support the language settings of your users. For example, in an English wiki, the English system message for ⧼pdfcreator-pdf-disclaimer⧽ can be changed on the page MediaWiki:pdfcreator-pdf-disclaimer. the German language version on page MediaWiki:pdfcreator-pdf-disclaimer/de.
Alternatively, you can simply type your own text if the PDF export does not have to consider user languages. Or leave the section blank if you don't want to print text.
Configure the document preface (PDF cover)
You can define the following elements on your cover page:
Background image:
- If a bookshelf image exists, the bookshelf image is used as cover image for the Book PDF export.
- If no bookshelf image exists, the default image defined in the Configuration Manager is used as cover image for the Book PDF export.
- If a custom image is defined in the PDF template, the custom image will be used for the Book PDF export.
If you do not want to use any background image on your PDF cover page, all three locations for defining a book image must be empty.
Properties
The following properties can be configured:
Label | Name | Description |
---|---|---|
Show namespace prefix | nsPrefix | The namespace prefix of pages is not printed in the page titles. |
Show table of contents | embed-page-toc | Include the table of contents of each exported page. |
Ignore redirect | no-redirect | If links are redirecting to a different page, the target page is not included in the pdf. |
Allow attachments | attachments | If files are directly linked with syntax Media: , the files are also attached in the pdf. |
Disable links in PDF | suppress-links | Replaces all links in the pdf with a span-element if they do not link to a target within the pdf. |
- | coverBackground | This property is set programmatically when a custom cover background image is provided. |
PDF template slots
All templates are saved as subpages of MediaWiki:PDFCreator.
Configuration
Configuration for the default page export template and default cover image

Hide namespace prefix in PDF: Removes the namespace prefix from titles and from template parameter "title" in the PDF output.
- Default export template for pages: The default template is shown when users select an export template in "Page" mode. It is also used when clicking on the PDF link for the Content Droplet PDF Link.
- Default cover background image
Admins can also set a default cover background image. It is applied whenever the document preface of the template contains the standard "intro"-wrapper
Output:

The image path can be deleted. In this case, no image will be output by default.
Alternatively, an uploaded image file can be specified (without a namespace prefix), for example: industry.jpg

If a book has its own bookshelf-image, this will be generated in the PDF when exporting directly from the special page "Books".
Semantic Mediawiki
The books in which a page exists can be queried via the semantic property Books (Property:Books). Display of values for property "book" of a wikipage
