PDF - Get PDF Information
Declaration
<AMPDF ACTIVITY="get_info" SOURCE="text" RESULTDATASET="text" />
Description: Gathers document properties of a PDF file, such as title, author, subject, keywords and security settings and loads the information onto a dataset.
Practical Usage
Commonly used as a conditional object that can alter workflow or task progression based on the information retrieved from the source PDF document. For example, if the Subject property states "please sign," then execute the Sign activity along with the Send e-mail activity to digitally sign the document then send it to the appropriate recipient. Otherwise, execute a Stop task activity to end the task.
Resource Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Resource |
--- |
--- |
--- |
--- |
Indicates where the source PDF should originate from. This is a design mode parameter used only during task construction and configuration, thus, comprises no markup. The available options are:
|
Session |
Text |
Yes if Resource parameter is set to Session |
PDFSession1 |
SESSION="mySession" |
The name of an existing session to associate this activity with. This parameter is active only if the Resource parameter is set to Session. |
Source PDF |
Text |
Yes if Resource parameter is set to File |
(Empty) |
SOURCE="C:\temp\source.pdf" |
The path and file name of an existing PDF document in which to extract contents from. This parameter is active only if the Use previously created session parameter is disabled. |
Password (optional) |
Text |
Yes if Resource parameter is set to File |
(Empty) |
PASSWORD="encrypted" |
The password required to open the existing PDF document (if required). |
Data Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Create and populate dataset |
Text |
Yes |
(Empty) |
RESULTDATASET="docInfo" |
The name of the dataset to create and populate with information about the PDF document. For more details, see Datasets below. |
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Datasets
A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset with the following fields (rows).
Name |
Type |
Return Value |
---|---|---|
theDataset.Application |
Text |
The application used to create the PDF document. |
theDataset.Author |
Text |
The author of the PDF document. |
theDataset.CreationDate |
Date |
The date and time the PDF document was originally created. |
theDataset.File |
Text |
The location and file name of the PDF document. |
theDataset.IsEncrypted |
Yes/No |
Indicates whether the PDF document is encrypted. |
theDataset.IsSign |
Yes/No |
Indicates whether the PDF document is signed. |
theDataset.IsValidPDF |
Yes/No |
Indicates whether the PDF file is valid. |
theDataset.ModificationDate |
Date |
The date and time the PDF document was last modified. |
theDataset.NumberOfPages |
Number |
The total number of pages that the PDF document contains. |
theDataset.PdfVersion |
Number |
The document's PDF version. |
theDataset.Producer |
Text |
The program or application that produced the PDF document. |
theDataset.Subject |
Text |
The subject of the PDF document. |
theDataset.Title |
Text |
The title of the PDF document. |
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: Create and populate dataset "thePDFInfo" with PDF information. Existing PDF "C:\temp\myDocument.pdf".
<AMPDF ACTIVITY="get_info" SOURCE="C:\temp\myDocument.pdf" RESULTDATASET="thePDFInfo" />