|
PDF - Get PDF information |
Declaration
<AMPDF ACTIVITY="get_info" SESSION="text" SOURCE="text" PASSWORD="text (encrypted)" RESULTDATASET="text" />
Description
Retrieves document properties of a PDF file, such as title, author, subject, keywords, and security settings and then 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 file. For example, if the Subject property states please sign, then execute the Sign activity along with the Email - Send message activity to digitally sign the document and then send it to the appropriate recipient. Otherwise, execute a Task - Stop activity to end the task.
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 document properties. 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). |
Data
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 file. For more details, see Datasets below. |
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.Application | Text | The application used to create the PDF file. |
theDataset.Author | Text | The author of the PDF file. |
theDataset.CreationDate | Date | The date and time the PDF file was originally created. |
theDataset.File | Text | The location and file name of the PDF file. |
theDataset.IsEncrypted | Yes/No | Indicates whether the PDF file is encrypted. |
theDataset.IsSign | Yes/No | Indicates whether the PDF file is signed. |
theDataset.IsValidPDF | Yes/No | Indicates whether the PDF file is valid. |
theDataset.ModificationDate | Date | The date and time the PDF file was last modified. |
theDataset.NumberOfPages | Number | The total number of pages that the PDF file contains. |
theDataset.PdfVersion | Number | The document's PDF version. |
theDataset.Producer | Text | The program or application that produced the PDF file. |
theDataset.Subject | Text | The subject of the PDF file. |
theDataset.Title | Text | The title of the PDF file. |
Example
- 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 tasks creates and populates a dataset with a PDF file's information.
<AMPDF ACTIVITY="get_info" SOURCE="C:\temp\myDocument.pdf" RESULTDATASET="thePDFInfo" />