Print View
    • 16 Apr 2024
    • 3 Minutes to read
    • Contributors
    • PDF

    Print View

    • PDF

    Article summary

    Print Preview

    The Autoform Print Preview interface adds the ability to generate a PDF from raw T24 data ‘on the fly’. For example, rather than printing out a copy of the raw T24 data for a customer, it is possible to use this functionality to instantaneously generate a customer-facing document containing the raw data and then printing this off locally.

    Overview

    The Print Preview integration files are held in autoform-printpreview-4.*-bin.zip. The servlet details must be added to the relevant web.xml file, and the Print Preview jar must be placed in the correct folder.

    Several ‘support’ files must be added to the relevant folder under the BrowserWeb.war. Furthermore, some Formpipe functions must be added to the custom.js file under the same BrowserWeb.war.

    The Print Preview interface relies on Autoform LN being installed and configured to create the PDFs and return them to the T24 Browser window.

    Provided Components

    • efs-printpreview-4.*.jar - The filter and servlet

    • web/web.xml - A basic configuration example

    • web/web-full.xml - A complete configuration example along with documentation for each option

    • web/autoform_error.jsp - Error page

    • web/transforms/itransform.xsl - basic xsl transform

    • web/transforms/itransform-enquiry.xsl - Enquiry xsl transform

    • web/transforms/itransform-version.xsl - Version xsl transform

    • web/images/message.png - Image used by error page

    • web/images/pdf.gif - PDF button icon

    • web/images/scandocument.gif

    • web/images/takephoto.gif

    • web/images/scanbarcode.gif

    • web/javascript/printPreviewRequest.js - custom javascript for triggering the print preview

    Configuration and Integration

    1. Add efs-printpreview-4.*.jar to BrowserWeb.war/WEB-INF/lib.

    2. The following files should be copied into the specified subfolder relative to BrowserWeb.war:

    • web/autoform_error.jsp → /jsps

    • web/transforms/* → /transforms/custom

    • web/images/message.png → /plaf/images/autoform

    • web/images/pdf.gif → /plaf/images/default/tools

    1. Add the contents of web/javascript/printPreviewRequest.js to BrowserWeb.war/scripts/custom.js.

    2. Add the example configuration from web/web.xml to BrowserWeb.war/WEB-INF/web.xml in the relevant position, replacing any that already exist with the same name (following web.xml ordering).

    Consult web-full.xml for an example that includes all configurable parameters for the interface, along with explanations for each.

    Lasernet Authentication

    This feature is supported starting from version 4.1.5.

    If communicating with a Lasernet WebInput port that has been configured to require BASIC authentication, the login credentials can be supplied as an init-param in web.xml.

    Logging

    Debugging is configured in BrowserWeb.war\WEB-INF\classes\log4j.properties (or jboss-specific log config file) by setting the com.efstech category to DEBUG.

    Usage

    To use the Print Preview functionality, a browser tool needs to be added to the T24 Enquiry or Version that is needed to run on.

    • AUTOFORM.PDF.ENQ

    • AUTOFORM.PDF.CONTRACT

    The Browser tools described below execute functions that were added to the custom.js script. There is a function for Versions and one for Enquiries. Generally, adding the browser tool is as simple as adding the drill-down, but in some circumstances, a drill-down must be added.

    Add as a Browser Tool

    An example of adding the Browser tool is the T24 Enquiry ACCOUNT.STATEMENT where the browser tool AUTOFORM.PDF.ENQ has been added.

    This is done by executing ENQUIRY, ACCOUNT.STATEMENT and adding the Browser tool as a tool ID.

    Field

    Value

    Tool Id.1

    AUTOFORM.PDF.ENQ

    GB Tool Text.1

    Generate PDF

    Add as a Drill Down

    The Print Preview button might need to be added as a drill down. This is usually to match the drill down in an Enquiry that generates the raw data.

    The following example shows ENQ FT.TXN.DELIVERY:

    Adding another drill down to the Enquiry and configuring this to use the Print Preview functionality adds the Print Preview link.

    Add the Drill Down

    To add this new drill down, a new Search Field must be added to the Enquiry. This is done using ENQUIRY, FT.TXN.DELIVERY. The drill down matches the T24 one, with a few minor differences to engage the Print Preview interface. In the example, the current drill down looks as follows:

    Add Enquiry Name.2 to match the Selection criteria of the current drill down.

    Field

    Value

    Enquiry Name.2

    AUTOFORM.PDF

    Sel Crit.2.1

    KEY EQ DE.ID

    Sel Crit.2.2

    MESSAGE.TEXT NE TYPE

    GB Nxt Desc.2

    View Delivery[pdf.gif

    Declare the Search

    The name of the Enquiry we have added (AUTOFORM.PDF) must be declared as a field. We can copy what has been configured for the original drill down (NEXT.LEVEL).

    Create a new field and give it the same name as the new drill down (AUTOFORM.PDF). Then, copy the Operation from the original drill down.

    Field

    Value

    Field Name.23

    AUTOFORM.PDF

    Operations.23.1

    IF DISP.TEXT EQ REPAIR DRILL1 DRILL3

    Field Disp Type.23

    Image


    What's Next