Working with Printing Resources

Documentation home

Prequisites 1

What is a printing resource? 1

Creating a printing resource in the designer 1

Resource Fields 3

Resource fields toolbar 3

Printing resource toolbar 3

Using the printing resource. 3

Adding the resource to a business view. 3

Associating the business view with a form.. 3

Mapping printing resource fields to form fields 3

Printing to a PDF document 4

 

See also:       Understanding Ebase Integration

                   Printing Form Pages

Internationalization Support

 

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 also supports the creation of PDF documents from one or more form pages using the outputpageFPL command. Click here for details.

 

Prequisites

To display an Adobe acrobat PDF document requires installation of the Adobe Acrobat reader on all client systems.

                       

What is a printing resource?

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.

 

Creating a printing resource in the designer

Open the printing resource editor by either clicking on an existing printing resource in the hierarchy tree panel (IT Elements --> External Resource --> Printing Resource) or selecting (File --> New --> External Resource --> Printing Resource)

      

 

   

 

Resource Description allows you to provide a description of this printing resource.

Debug: is not used with Printing Resources

Full document path on server: 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 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)

Resource Fields

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.

 

Resource fields toolbar

 

 Add a resource field

 Delete selected resource fields

 

Printing resource toolbar

 

 

* 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.

 Add the resource to one or more Business Views. Supports both adding to one or more existing Business Views and the creation of a new Business View. Existing Business Views can only be changed when they are not already open.

* Show information: shows userid and dates for creation, last update and import of this printing resource.

* Shows this help page.

 

 

Using the printing resource

Adding the resource to a business view

Click the  icon on the toolbar.

Associating the business view with a form

In the form editor, select the business view from the dropdown list in form properties.

Mapping printing resource fields to form fields

To create mappings automatically between form fields and a resource fields, simply 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, click on the field mappings icon on the form toolbar of the form editor, select the resource to be mapped, then select the form fields for each of the resource fields from the dropdown list.

 

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.

 

Printing to a PDF document

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.