|
PDF - Get attachment(s) |
Declaration
<AMPDF ACTIVITY="extract_attachment" SESSION="text" SOURCE="text" PASSWORD="text (encrypted)" ATTACHMENTSDEST="text" FILENAME="text" SAVEMODE="text (options)" />
Description
Extracts all or specific file attachments and/or file annotations from a PDF file and then saves them to the desired location.
Practical Usage
Used to extract PDF file attachments and file annotations to a specified location in order to open or process them using subsequent activities.
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 the Resource parameter 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 the Resource parameter is set to File | (Empty) | SOURCE="C:\temp\source.pdf" | The PDF path and file name of where to extract file attachments and/or file annotations. This parameter becomes active and is required if the Resource parameter is set to File. |
Password (optional) | Text | Yes, if the Resource parameter is set to File | (Empty) | PASSWORD="encrypted" | The password required to open the existing PDF file (if required). |
Attachment
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Destination | Text | Yes | (Empty) | ATTACHMENTSDEST="c:\temp\folderName" | The destination folder where the extracted file attachments and/or file annotations are saved. |
If filename already exists | Text (options) | Yes | Overwrite existing file |
|
Specifies the action to take if files with the same file names as the extracted file attachments and/or file annotations already exist in the Destination folder. The available options are:
|
Extract | --- | Yes | All | --- | Specifies the file attachments and/or file annotations
to extract. The
available options are:
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes. |
Specific file | Text | Yes, if Extract is set to Specific file | (Empty) |
FILENAME="file.txt" |
The file names of the file attachment and/or file annotations to extract. Click the folder icon to open the Attachment Browser which allows you browse and select files currently attached to the source PDF file or you can manually enter the desired file names in the provided text-box. Use a comma to delimit each entry (for example, file1.txt,file2.txt,fileA.png). |
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 task extracts specific attachments from a PDF file and then stores them in a folder.
<AMPDF ACTIVITY="extract_attachment" SOURCE="C:\temp\sample.pdf" ATTACHMENTDEST="C:\temp101\" FILENAME="HR_Department.txt,process_info2.txt" />