IMPORT PDF command

Used to define ACL tables from Adobe Acrobat (PDF) files.

Syntax

IMPORT PDF TO table <PASSWORD num> import_filename FROM source_filename
<SERVER profile_name> skip_length <PAGES page_range>
 {[record_syntax] [field_syntax] <...n>} <...n>

 

record_syntax ::=
RECORD name
recType lines transparent [test_syntax]<...n>

 

test_syntax ::=
TEST inc match_type AT line, start, logic range text

 

field_syntax ::=
FIELD name type AT value SIZE value DEC value WID value PIC value AS value

Parameters

TO table

Specifies the name of the ACL table to import the data into.

PASSWORD num

Specifies the password for password protected PDF files. The num parameter corresponds to the number of the password definition to use. For example, if you have defined two passwords in your script, PASSWORD 2 specifies that the second one should be used. If you do not define the password value in your script, a password prompt will be displayed when the script is run.

import_filename

Specifies the name of the ACL data file. The import_filename parameter must be specified as a quoted string with a .FIL file extension (e.g., "Invoices.FIL").

If you do not want to create the .FIL file in the same directory as the ACL project, you can specify an absolute or relative file path to an existing folder to write the .FIL file to.

For example: "C:\data\Invoices.FIL" or "data\Invoices.FIL"

FROM source_filename

Specifies the name of the source data file. This parameter must be specified as a quoted string.

If the source data file is not located in the same directory as the ACL project, you must use an absolute path (e.g., "C:\data\source_filename") or a relative path (e.g., "data\source_filename") to specify the file location.

skip_length

Optional. Specifies the number of bytes to skip at the start of the file. For example, if the first 32 bytes contains header information, specify a skip length value of 32 to omit this information.

PAGES page_range

Specifies the pages to include if you do not want to include all of the pages in the PDF file. You can specify individual pages separated by commas (1,3,5), page ranges (2-7), or a combination (1, 3, 5-7, 11). The page_range parameter must be specified as a quoted string.

FIELD name type

Specifies the name and data type of the field. For information on the values you can enter for the type parameter, see Identifiers for field data types.

AT value

Specifies the start position for the field in the data file.

DEC value

Specifies the number of decimals.

WID value

Specifies the length of the field in the ACL table layout.

PIC value

Specifies the format for date and numeric fields. For numeric fields the format specifies how the values should be displayed. For date fields, the format specifies how dates are stored and should be read from the data source.

AS value

Specifies the display label (alternate column title) for the field in the ACL view. The AS parameter is required when you are defining a field. If you want the display label to be the same as the field name, you can enter a blank value using the following syntax: AS "". Make sure there is no space between the two double quotation marks.

Example

The following example imports data from pages 3 and 4 of password protected PDF file.

IMPORT PDF TO VendorList  PASSWORD 1 "Vendors.pdf" 0 PAGES "3-4" 
RECORD "Detail" 0 1 0 TEST 0 0 AT 1,66,0 7 "." 
FIELD "Vendor_Name" X AT 1,63 SIZE 7,1 DEC 2 WID 7 PIC "" AS "Vendor Name"


(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback