Introduction

Introduction

Note: These features are part of the Visforms Subscription and are not included in the free Visforms version.

Creating PDF documents with Visforms is a very powerful feature.

With the PDF feature you can:

  • Allow users to download PDF files of the data they transfer in the frontend.
  • Create and download PDF files very flexibly and directly in the administration.

It is best to read the entire PDF documentation from start to finish

This part of the documentation is an introduction to a very powerful but technically more or less demanding feature. This introduction contains all insights and all necessary information about how the PDF documents work with Visforms.

Once you’ve created your first PDF template or two, you’ll find the work easy. There are hardly any limits to the possible applications and the possible dynamic content of your PDF templates. Simple PDF templates are easy to create.

Note: We recommend that you read this part of the documentation completely from beginning to end.

PDF files are created from PDF templates

PDF templates are created for a specific form. A PDF template is text formatted in HTML.

The PDF template consists of up to three individual HTML texts:

  • Page HTML
  • Page Header HTML
  • Page footer HTML.

The HTML may contain specially formatted placeholders that will be replaced with actual data at runtime.

Possible parameter replacement data includes:

  • the form data of a transmission,
  • the form data of all or selected transfers,
  • the form data of other forms,
  • any data from the database,
  • field parameters,
  • form parameters,
  • user information,
  • Content document information such as current page number and printing date,
  • Control instructions like
    • Document formatting, such as ‘New page after’,
    • Instructions for loops and recursions.

The replacement of the placeholders in the PDF template can also be done recursively. This makes lists as PDF documents possible, which show all orders from the current year for all customers, for example. Each customer can have a page break to a new page beginning with customer information.

The places marked for recursion are treated as follows in the PDF template:

  • copied,
  • replaces the included placeholders and
  • progressively appended to the PDF document.

Which data records are automatically used also depends on the deployment site.

A distinction is made whether the finished PDF document is generated

  • from the frontend or
  • from the administration.

After the placeholders in the PDF template text have been replaced, a PDF document is generated from the HTML using the Library TCPDF.

Create, test and use PDF templates

Visforms supports you with flexible placeholders, powerful tools for replacing the placeholders and an extensive SQL-based record selection.

You manage the PDF templates in the Visforms Administration with the following options

  • generate,
  • test and
  • use directly.

PDF templates can be used directly in the administration via the corresponding buttons in the button bar. In this case, you also have very flexible tools for selecting the data records that are to be used to actually create the PDF document from the PDF template.

However, PDF templates can also be used by the users of your website in the front end. For example, users of your website can download PDF documents with the data that they have submitted in forms in the front end.

Editing PDF templates is similar to editing fields

Basically, creating PDF templates works the same way Visforms works in general. Just as a form has several fields, a form can also have several PDF templates. What you know about editing the Visforms fields in relation to a form also applies in principle to the Visforms PDF templates.

PDF templates are bound to a form

Note: Some settings, such as those on the "General" and "PDF Settings" tabs, are largely self-explanatory and will not be discussed further here.

You are already familiar with the concept from the form fields.

So you can only manage PDF templates if you

  • are in the configuration of a concrete form or
  • are in the form overview list.