Print service plugin


Plugin download (requires login)

Please use plugin version 2.0.0 or above for Xima® Formcycle Version 6.

The plugin Print Services is available separately and lets you create a PDF document from a form that is optimized for printing. This plugin is subject to additional charge.

Technical details

In technical terms, the conversion is done using Selenium and the driver phantomJS. The page format of the created PDF document is A4.

When you print a form with the print services, JavaScript defined for the form is executed. However, please note that no newer JavaScript features are supported. Specifically, no features from EcmaScript6 and higher are available. This that, for example, you cannot use new keywords such as let and const or new syntax such as arrow functions or destructuring.

Installation

The plugin can be installed as client plugin or system plugin. Instructions for installing plugins can be found here.

There are several versions of the Print PDF plugin for different operating systems (32-bit Linux, 64-bit Linux, Windows, MacOSX). It is only necessary to install the version of the plugin that corresponds to the operating system on which Xima® Formcycle is installed. The operating system used is displayed on the Server information page.

Usage and options

To use this plugin, go to the workflow processing configuration, click on new action and select this plugin. The following options are used to configure the plugin action:

File name
File name of the created PDF document.
Print mode
Input elements as text: Input elements are converted into plain text fields and the form is adapted to the width of the page.
Print mode
Web view: No changes are made to the form and it is converted so that it looks as closely as it does in a web browser as possible.
Zoom factor
Factory by which the form is scaled. Use this to magnify or scale down very large or very small forms.
User groups
A virtual user is created when opening the form with Selenium. Select the user groups here to which this virtual user should belong to. Form elements can be configured to be displayed or editable only for certain user groups.
URL parameter
Additional URL parameters added to the URL used when opening the form with Selenium. You can use URL parameters to prefill form fields or access them from within JavaScript.

Input elements

To optimize the form for printing, form elements of type input field, text area und select (Drop-Down) may be converted to plain text fields, if the print mode is set to Input elements as text.

Additionally, the CSS classes print and XSpan are added to the converted input element that can be used for styling them. For example, in order to change the font size, you can use the following CSS:

.print.XSpan {
 font-size: 18pt;
 font-family: serif;
}

To overwrite some properties of the default CSS shipped with Xima® Formcycle, use more specific selectors such as:

.xm-form .xm-content div.print.XSpan {
 font-size: 18pt;
 font-family: serif;
}

Most properties do not require this, however.