JetTrac TrimOverflow

Introduction:

The following document will go through the functionality found within JetTrac TrimOverflow. This module is used to delete overflow pages from a AcroForm PDF prior to the form being filled out with data.

Technical Support:

If you need assistance in installing and configuring JetTrac TrimOverflow™, call Pro Technology Automation, Inc. at 805-527-1248 or email us at support@protechinc.com. Please note that the JetTrac TrimOverflow™ license fee does not cover configuration services and technical support so there may be an additional charge. Please ensure you read these instructions carefully before calling for technical support.

How to run JetTrac TrimOverflow:

To run the program, you will need to have the following files located in the same folder:

  • JTTrimOverflow.exe
  • ExitHandler.dll
  • DebenuPDFLibraryDLL1112.dll

Executable files and dll files should not be edited for any reason.

Default Functionality:

JetTrac TrimOverflow will look through an input XML file to find a field that has a numeric value that corresponds with the number of a specific item that is needed, then it will look through an imput PDF template to find a hidden field marking that page as being an overflow page that has those items. Then the module will remove excess overflow pages according to how many are needed for that specific XML.
For example, an XML can contain a field specifying that a facility has 10 tanks. Then in the form we could have 4 tanks per page. JetTrac Trim Overflow will then remove pages with the tank hidden field until there are only enough to fit the number of tanks that the XML states is needed. In this case all but three of the pages will be deleted allowing space for 10 tanks on the form.

Job Step Configuration Window in JobConfig for JetTrac TrimOverflow:

When setting up a job step using JTTrimOverflow in JobConfig the only lines of the config you need to worry about are the first two and the last two, the Config file, the Input PDF, the Input XML and the Output PDF. If left as an asterisk * the input will be whatever file is in the data folder that triggered the job running. This works well if it’s the first step but if the input is also the output of a previous job step you would need to specify the fully qualified path of the input. Because this module has two input’s one of them will have to be given a file path. All other fields should be filled with the fully qualified path to the intended file. Eg: C:\JetTrac\…\input.pdf
In JobConfig, file paths entered should not be in quotes.

As with all modules, there is a dropdown to select whether or not the job should stop completely if this step fails. If you select Yes, any error will terminate the job process and write to the log file what happened, if no, then the job will try to continue anyways. However if any steps further down the line rely on the output of a job set to not stop on error, they may not work properly.

For more specifics go to the JetTrac Field ServiceJobConfig page.

JetTrac TrimOverflow Command Line:

The command line to run JetTrac TrimOverflow contains the location of the executable, the input XML file, the input PDF, the output PDF after the pages are deleted, the configuration .ini file, and the log file. The following is an example of the command line used to run this module:

“C:\JTTrimOverflow.exe” “C:\Input.xml” “C:\Input.pdf” “C:\Output.pdf” “C:\Config.ini” “C:\TrimOverflow.log”

Each part of the line is divided by spaces (the amount doesn’t matter), and contains the fully qualified file path to the file you are referencing surrounded by quotes. In the example all of the file paths reference the root of C:\, however, it is likely that none of these files will be located in the root of C:\ for your system, so this is simply demonstrating that the full file path is required.

Setting up the Configuration .ini:

The configuration .ini file contains the following lines:

Trim_Tanks=Tanks_Field_XML,Tanks_HiddenField,8
Trim_Pipe=PipingRuns_Field_XML, PipingRuns_HiddenField,8
Trim_TurbineSumps=TurbineSumps_Field_XML,TurbineSumps_HiddenField,8
Trim_UDC=Udcs_Field_XML,Udcs_HiddenField,8
Trim_Dispensers=Dispensers_Field_XML,Dispensers_HiddenField,8
Trim_Nozzles=Nozzles_Field_XML,Nozzles_HiddenField,8
Trim_FillSumps=FillSumps_Field_XML,FillSumps_HiddenField,8
Trim_SpillBuckets=SpillBuckets_Field_XML,SpillBuckets_HiddenField,8

Each of these lines follows the same format. The variable name is first and followed by an equals sign. These variable names cannot be changed. After the equals sign there is the field name within the XML that specifies how many of that item are needed on the form, the hidden field name that is on each page of the form that has that item, and the number of that item on each page of the form.

With this example configuration .ini file, if there is a form that has 5 pages with the Tanks_HiddenField hidden field and the Tanks_Field_XML node within the input XML file has the value of 20, the module will delete 2 of the pages on the form with the hidden field. This is because as each page can have up to 8 tanks, 3 pages are all that is needed to fit 20 (the pages will allow for a total of 24).

Setting Up the Hidden Fields:

On every page of the form that contains data for the specific item you wish to trim (ex: Tanks), you will need to add a hidden field using the name you specified in the configuration .ini file. This field does not need a value, the name simply has to match up with the configuration file.

Additional Notes:

A single page in a form cannot have more than a single hidden field for use with this module. If you have a page that contains both Tanks and Nozzles, you cannot have both the hidden field to trim for nozzles and the hidden field to trim for tanks. It is recommended that you only add the hidden field for the item that will have the most quantity.

This module was developed specifically for UST so that forms that have a large number of overflow pages can be trimmed before a technician fills it out. This speeds up loading of the form and can solve issues with the form lagging on mobile devices due to the file size.