PDF - List attachment(s)

Declaration

<AMPDF ACTIVITY="get_attachment_info" SESSION="text" SOURCE="text" PASSWORD="text (encrypted)" RESULTDATASET="text" />

Related Topics  

Description

Retrieves information related to all file attachments and file annotations contained in a PDF file and then creates and populates a dataset with results.

Practical Usage

Used to put information related to any file attachments and file annotations contained in a PDF file into a manageable list in order to perform actions/activities on each item.

Parameters

Resource

Property Type Required Default Markup Description
Resource --- --- --- --- Specifies the source of the PDF file. The available options are:
  • File (default) - The source derives from a PDF file located on the system. This option is normally selected if only a single activity is required to complete the operation.
  • Session - The source PDF is obtained from a pre-configured session created in an earlier step with the use of the PDF - Create session activity. This option is normally selected if a combination of related activities is required to complete an operation. Consolidating several activities to a single session can eliminate redundancy. Moreover, a single task supports multi-session executions which can improve efficiency and speed up production.
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes.
Session Text Yes, if Resource is set to Session PDFSession1 SESSION="mySession" The existing session to associate with this activity. This parameter becomes active and is required if the Resource parameter is set to Session.
Source PDF Text Yes, if Resource is set to File (Empty) SOURCE="C:\PDFFileName.pdf" The PDF path and file name of where to retrieve file attachment- and file annotation-related information. This parameter becomes active and is required if the Resource parameter is set to File.
Password (optional) Text No (Empty) PASSWORD="encrypted" The password required to open the PDF file (if required).

Attachment

Property Type Required Default Markup Description
Create and populate dataset Text Yes (Empty) RESULTDATASET="myDataset" The name of the dataset to create and populate with the retrieved file attachment- and file annotation-related information. See Datasets for more information on the fields this dataset creates.

Description

Error Causes

On Error

Additional Notes

Datasets

A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset containing a specific set of fields in addition to the standard dataset fields. The table below describes these fields (assuming the dataset name assigned was theDataset).

Name Type Return Value
theDataset.File Text The file name of the attachment.
theDataset.Description Text The description of the attachment.

Examples

NOTE:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

Description

This sample task retrieves all attachments found in a PDF file and then creates and populates a dataset with that information.

Copy
<AMPDF ACTIVITY="get_attachment_info" SOURCE="C:\Temp\SamplePDF.pdf" RESULTDATASET="theDataset" />