Working with Printing
Resources
Creating
a printing resource in the designer
Adding
the resource to the form
Mapping
printing resource fields to form fields
See also: How Resources Work
This document describes the use of print resources. The resources can be used only with existing PDF form documents. These PDF form documents can be imported and the PDF fields mapped to form fields. Ebase Xi also supports the creation of PDF documents from one or more form pages using the outputpage FPL command. Click here for details.
To display an Adobe acrobat PDF document requires
installation of the Adobe Acrobat reader on all client systems.
A printing resource allows you to interchange data between an
Ebase form and an Adobe PDF form. Form fields can be imported from a PDF and
used to create an Ebase form. Additionally the FPL print command or API PrintResource.print() method can be used to display the
Adobe form and populate it with the data entered via the Ebase form.
Printing resources are sharable elements within the Ebase
system and, once created, can be used by any number of forms.
Right click in the designer tree and select New > Printing Resource.
Description allows you to provide a description of this printing resource.
Debug: is not
used with Printing Resources
Document Path: this is the full file path of the PDF document
on the server. This can be any file path accessible to the server. It cannot be
a URL. It can be specified as an environment
variable. Please note that this field is set by the import function to the
full path of the imported file on the Ebase designer system. This must
be changed to the corresponding full path on the Ebase Server system.
Suppress regional formatting. If this option is set, field values in the PDF will be the same, regardless of the form's language setting. If unset, field values will be formatted according the form's language setting. (See Internationalization Support for more information)
The field Type, Length, and Dec. digits fields are
used only to set the corresponding field values when a printing resource is
imported into a form.
If the Required checkbox is ticked, the PRINT script will fail unless a value is supplied.
Add a resource field
Delete selected resource fields
Save: saves the printing resource.
Import external document: presents a dialog
that allows you to import fields from an Adobe PDF containing a form. The
import process will create resource field names meeting the Ebase requirements
and will set the field length if this is available in the Adobe form. The field
type will always be set to VARCHAR signifying a character field.
Maintain Documentation
Show information: dates for creation, last update and import of this Printing Resource.
Shows this help page.
Add the Email Resource to the Resources View in
the form.
To create mappings automatically between form fields
and a resource fields, import the resource fields into the form using the Import
fields from external resource icon on the Fields
View toolbar of the form editor. This will
create new form fields of the appropriate type and length and will also create
the mapping.
To create mappings manually, select the resource in the Resources View then click on the mappings icon on the Resource View toolbar.
The following PDF form field types are supported:
PDF form fields of type Text or Button can be
mapped to any Ebase form field type.
PDF form fields of type Radio Button or Choice
should be mapped to an Ebase field with display type dropdown list or radio
button, and this field should be linked to a static list where the return values correspond
with the expected values in the PDF form.
PDF form fields of type Checkbox should be mapped to
an Ebase field with display type checkbox and field type boolean.
This is achieved using the FPL print command which has the
syntax:
FPL: |
API based language
(Javascript): |
print printing_resource_name
[ and save [ nodisplay ]; |
resources.printing_resource_name.print(); resources.printing_resource_name.print(boolean save, boolean noDisplay); |
These statements display the PDF document supplied in the full document path on server field in the Adobe acrobat reader and populate it with the data from the Ebase form. The document can then be printed by pressing the print button within the reader. The save option instructs the system to additionally save the completed document on the server; the nodisplay option additionally instructs the system to suppress the display of the print document. See working with files for more information.