PDF Editor


The layout of templates for invoice and packing slip PDFs can be edited with the PDF editor. The editor is available in the respective template (QR-Bill > Templates > [Select or create template]).

 

Sections and layout

A PDF consists of three main sections that can be edited individually in the editor: Header, Content and Footer. Header and Footer are displayed at the top and bottom of each page in the PDF.

In the image the Header section is selected.

Each section can consist of several rows, which in turn can contain several cells. Rows can only be inserted into the three sections Header, Content or Footer using drag-and-drop (no nesting). The cell widths can be changed after insertion by moving the right edge.

Cells can contain several items from the “Content” menu area. Content elements cannot be inserted directly into other elements than cells.

A row is selected within the Content element. This can be placed in the Header, Body or Gooter, or moved within the same elements.
The left cell within a row is selected. This can be moved within the row or to other rows.
The “Beneficiary” content item within the left cell is selected. Content items can only be placed in cells.

 

Content elements

The following elements can be placed in cells using drag-and-drop.

Text

Within text elements there can be line breaks and the text or individual parts of it can be formatted as bold, italic or underlined.

In addition, tags can be used to automatically insert content when generating the PDF. E.g. the tag {wc_order_id} can be used to insert in its place the ID of the WooCommerce order associated with the invoice/packing slip. If the data associated with the tags is not found, nothing will appear on the PDF at that location.

A list of available tags can be found here.

 

Image

Images are always displayed in the full cell width, i.e. to reduce the size of an image, the cell width must be reduced.

 

Payer

In the “Settings” tab, the text “To:” can be changed. You can also set whether the email address should be displayed.

To freely configure the invoice recipient, a text element with tags can be used instead (see Text element above). E.g.:

{payer_company_or_name}
{payer_street}
{payer_zip} {payer_city}
{payer_country}

 

Beneficiary

In the “Settings” tab, the text “From:” can be changed.

To freely configure the invoice recipient, a text element with tags can be used instead (see Text element above). E.g.:

{beneficiary_name}
{beneficiary_street}
{beneficiary_zip} {beneficiary_city}
{beneficiary_country}

 

Order data

This element can be used to add a list of the ordered products and the total to the PDF. If VAT is activated, it will also be displayed for the products and in the total.

Under “Settings” you can change the background colors for the header and the total, as well as the inner padding of table cells and column widths.

Settings for the “Order data” element.

 

Barcode

This element can only be used if the “Barcode for WooCommerce” plugin is installed.

If the invoice is linked to a WooCommerce order and a Swiss Post package label exists, the label will be placed here.

 

WebStamp

This element can only be used if the “WebStamp for WooCommerce” plugin is installed.

If the invoice is linked to a WooCommerce order and a Swiss Post stamp exists, the stamp will be placed here.

 

Styles

Various layout settings can be made in the “Styles” tab depending on the selected element.

Depending on the option, the units are given in “vw” or %. 1vw means 1/100 of the width of the PDF or an A4 page (corresponds to 2.1mm). Font sizes are given in %. 100% corresponds to the font size 9pt.

  • Padding: The padding describes the inner distance of an element.
  • Typography: The font, size, color, line height and text alignment can be adjusted here.
  • Border: Borders of an element can be selected individually (top, bottom, left, right). As an example, to generate a dividing line you would only create a top or bottom border for an element. To create a thin line, 0.1vw or 0.2vw can be used.
  • Background: The background color of an element.

 

Layers

In the “Layers” tab, the structure of the PDF is displayed as layers. Elements can be hidden and moved.