Writerside Help

Export to PDF

Writerside can generate a PDF from your documentation sources. The PDF will contain a table of contents with the page numbers and an optional cover page. It can also have some custom text in the header and footer of every page.

  1. In the Writerside tool window, click Export To Export To and then select PDF.

    Export to PDF
  2. In the Edit Configurations Settings dialog, you can change the following settings:

    Name

    Specify a meaningful name to differentiate between several configurations if you have more than one.

    Instance

    Select the instance. By default, the configuration will produce a PDF for the instance selected in the Writerside tool window.

    Save to

    Specify the directory where you want to save the generated PDF. By default, it will be saved to the root of your documentation project.

    Keymap

    If you have several keymaps defined, select the one that will be used in this PDF.

    Orientation

    Select between Portrait and Landscape page orientation.

    Cover page

    Add a cover page to the PDF output. Without it, the PDF will start with the table of contents as the first page. On the cover page, you can add a title, logo image, description, and a copyright.

    Specify the text that will be used in the header and footer of every page.

    Advanced

    Specify the title for the table of contents page.

    Run configuration for generating PDF from instance
  3. Click Run to start this run configuration.

  4. After a successful build, check the output for errors and warnings in the Run tool window. If everything is fine, you will see links to the generated HTML and PDF files.

You can create multiple run configurations to quickly generate PDFs for various instances or the same instance with different keymaps, headers, and footers.

Run them from the configurations widget in the main toolbar:

Run configurations widget

Add more run configurations

  1. Click Edit Configurations in the main toolbar widget or select Run | Edit Configurations from the main menu.

  2. In the Run/Debug Configurations dialog, click Add New Configuration Add New Configuration and add a new Writerside configuration.

Produce PDF as a build artifact

By default, the Writerside builder produces a documentation website as the build artifact. If you want to automate PDF generation, add the -pdf option to the main builder command helpbuilderinspect. In this case, the builder will produce a PDF as an artifact, not the website.

  1. Add an XML file with PDF generation options under the cfg directory. These options are the same as the ones in the PDF run configuration. Here is an example file with PDF generation options:

    <pdf landscape="true"> <cover-page> <title>My Awesome App</title> <description>User Guide</description> <copyright>Awesome Co © 2024</copyright> </cover-page> <header>Text in header</header> <footer>Text in footer</footer> <toc-title>Title for Table of Contents page</toc-title> <layout>Windows</layout> </pdf>
  2. Specify this file as an argument of the -pdf option or the value of the PDF variable when running the Writerside builder. For more information about running the builder, see Build with Docker.

Last modified: 14 November 2024