PDF - List annotation(s)

Declaration

<AMPDF ACTIVITY="list_annotations" SESSION="text" SOURCE="text" PASSWORD="text (encrypted)" RESULTDATASET="text" PAGE="number" />

Related Topics

Description

Retrieves information related to all Text, Free Text, and Watermark annotations contained in a PDF file and then creates and populates a new dataset with the results.

Practical usage

Used to put information related to all Text, Free Text, and Watermark 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 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).

Annotation

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

Page

Property Type Required Default Markup Description
Page range --- --- --- --- Specifies the pages of where to retrieve annotation-related information from in the PDF file. The available options are:
  • All - Retrieves annotation-related information from all pages in the PDF file.
  • Page(s) - Retrieves annotation-related information from one or more specific pages in the PDF file.
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes.
Page(s) Text Yes, if Page range is set to Page(s) (Empty) PAGE="1,3,5" If enabled, specifies the pages of where to retrieve annotation-related information from in the PDF file. For a single page, enter the page number. Use a comma (,) to specify more than one page (for example, 1,3,5). Use a dash (-) to specify a range of pages (for example, 5-10).

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.Title Text The title of the annotation. This dataset field is only populated by Text and Free Text annotations; Watermarks do not use a title.
theDataset.Content Text The text-based content of the annotation.
theDataset.Type Text The annotation type.
theDataset.PageNumber Text The page number the annotation was extracted from in the PDF file.

Examples

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

This sample task retrieves annotation-related information from a PDF file and then creates and populates a new dataset with the results.

Copy
<AMPDF ACTIVITY="list_annotations" SOURCE="C:\temp\output.pdf" RESULTDATASET="Annotations" />