Generating PDFs

6d6 Online contains a PDF generator that can convert any wiki page or collection of pages into a PDF.

Generating a PDF

PDF creation is controlled by the URL of the page. Adding &do=export_pdf to the end of the URL will create a PDF.

For example, this page's URL is:

Adding the export command gives us:

Copy and paste this URL into your browser and hit return. Depending on your browser, either the PDF will be displayed or automatically downloaded.

Purge & Cache

6d6 Online caches pages to reduce the demand on the server. By default, the PDF generator will use the cached page for the PDF. This is not normally a problem except when dealing with cards and compound pages (see below). In these situations, the cached page may be out-of-date or, in the case of cards, return the wrong the card in the wrong graphical format.

When printing cards or compound pages, the cache needs to be updated before the PDF is generated. This is done by adding &purge=1 to the URL when generating a PDF.

To create an up-to-date PDF of this page, the URL would be:

It is recommend then when generating a PDF, you always add &purge=1 to ensure the PDF is reflects the latest version of the page.

The PDF Tag

While a PDF can be generated from any wiki page, pages with the PDF tag, i.e. <pdf> has special behaviour (See Custom Markup for more about the PDF tag).

On PDF tag page, only the contents of the page between the PDF open and close tags will be included when the PDF is generated. Also the custom markup tags such as <chapter> and <subchapter> have special functions.

Tag Behaviour
Chapter Pulls in the content of the referenced page. At the end of the chapter (after an sub-chapters) there is a form feed so that what follows starts on a new page. The chapter name with be used in the table of contents.
Subchapter Pulls in the content of the referenced page. The subchapter name will be used in the table of contents.
Cover Uses the reference image as a full page graphic.
Flypage Pulls in the content of the referenced page and is printed without the page footer. Flypages are not included in the table of contents.
Blurb Ignored. The contented is not included in the PDF.
Section Pulls in the content of the referenced page but it is formatted differently and with no page footers. It also forces following content to start on a new page.


For information about generating PDFs for your cards, please see Printing Your Cards.

There are additional options for PDFs that can help with formatting (e.g. forcing a page break and sizing graphics) and options such an automatically generated table of contents. Information on these will be added soon.

Technical Stuff

The PDF generator used is the DW2PDF plug-in which in turn uses the mPDF library. Compound documents are achieved using the Include plug-in.

You could leave a comment if you were logged in.
open/generating_pdfs.txt · Last modified: 2012/02/28 13:02 by kieranflux
Recent changes RSS feed

The 6d6 RPG tabletop store is owned and operated by Chris Tregenza. Who also owns and runs Myomancy, a site about ADD / ADHD medication, Autism and Dyslexia Treatments and also site called Poosk. Chris also provides copy-writing, web design SEO advice to sites like Dingles' Games pathfinder rpg resources.