Save As PDF Dialog

In addition to using a printer or browser to generate PDF output you can also use the direct PDF generation that's built in using the Save As Pdf Dialog. From this dialog you can directly generate a PDF document by providing a few document specific options.

Markdown Monster uses wkhtmltopdf which is a command line utility for converting HTML to PDF. MM renders the document to PDF using the active preview theme and then converts the generated HTML to PDF.

The command line tool has many options which are documented here:

Markdown Monster uses this dialog to collect some basic information for generating the PDF file via command line utility. Note that you can also capture the command line and optionally run the commands from the command line yourself, adding additional options from the reference above.

PDF Generation Configuration

The following provides additional info on the input fields of the form.

Title

The title is displayed at the top of the document on the left side. The text is taken as is and displayed on every page. You can optionally embed any of wkhtmltopdf's meta tags like [section], [page], [topage] etc.

The footer is displayed on the lower right of each page. As with the title you can embed meta tags into the text that will be expanded by the tool.

Page Size, Page Orientation and Image DPI

These are pretty self explanatory. Image DPI only refers to image DPI not the entire document as the document is created as text.

Margins

Margins for all four document sides can be specified in millimeters. 0 is the default and it looks like it provides about 1/2 inch side margins. Top margins are much smaller if there are there are headers and/or footers.

Generate Table of Contents

A table of contents is generated by default for the first 3 levels (H1,H2,H3) of the document. If you don't want a TOC, uncheck this checkbox.

Display PDF after Generation

You can optionally view the PDF in your default PDF viewer.

PDF Viewer Locks

If you have your PDF open in a PDF viewer, most likely the PDF file is locked and you won't be able to re-generate it resulting in an error.

Generate PDF File

Once all the settings have been made you're ready to generate your PDF file. If all goes well you should be able to view your newly generated PDF right away.

Executing wkhtmltopdf.exe explicitly

If an error occurs, an error message is displayed. Unfortunately wkhtmltopdf doesn't generate very helpful error messages on failures, but you can capture the command line and take a look at the command MM sends to run the PDF generation. Using the Copy Commandline Button captures the last exectued command line to the clipboard.

You can open a command Window in the Markdown Monster install folder (%localappdata%\MarkdownMonster by default) and then execute and modify the captured command line there.

Save As PDF FAQ

wkhtmltopdf is a Third Party Tool

Markdown Monster uses a third party library as a convenience feature. We'll address any issues that can be managed through the command line interface, but any rendering engine issues you may run into are not something we can fix. If you run into issues for this you can file an issue on Github:

See also

Printing and Generating PDF Output

© West Wind Technologies, 2018 • Updated: 01/13/18
Comment or report problem with topic