|
PDF - List annotation(s) |
Declaration
<AMPDF ACTIVITY="list_annotations" SESSION="text" SOURCE="text" PASSWORD="text (encrypted)" RESULTDATASET="text" PAGE="number" />
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:
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:
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). |
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
- 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 annotation-related information from a PDF file and then creates and populates a new dataset with the results.
<AMPDF ACTIVITY="list_annotations" SOURCE="C:\temp\output.pdf" RESULTDATASET="Annotations" />