PDF - Insert
Declaration
<AMPDF ACTIVITY="insert" SOURCE="text" PASSWORD="text (encrypted)" SAVETYPE="text (options)" DESTINATION="text" EXTRACTPDF="text" INSERTPASSWORD="text (encrypted)" LOCATION="number" PAGE="number" />
Description: Inserts pages into a PDF document. This activity supports inserting pages extracted from another PDF document.
Practical Usage
Used to add additional data to a PDF document.
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. |
Use |
Text (options) |
Yes if Resource parameter is set to File |
Existing PDF |
|
Specifies whether this activity will be performed on an existing PDF document or on a new document. This parameter is active only if the Resource parameter is set to File. The available options are:
|
Source PDF |
Text |
Yes if Use parameter is set to Existing PDF |
(Empty) |
SOURCE="C:\PDFFileName.pdf" |
The path and filename of an existing PDF document to be used as the source. This parameter is active only if the Use parameter is set to Existing PDF. |
Password (optional) |
Text |
Yes if Use parameter is set to Existing PDF |
(Empty) |
PASSWORD="encrypted" |
The password required to open an existing PDF document (if required). This parameter is active only if the Use parameter is set to Existing PDF. |
On completion |
Text (options) |
Yes if Use parameter is set to Existing PDF |
Save |
|
Specifies what action should be performed on the existing PDF file upon completion of this activity. This parameter is active only if the Use parameter is set to Existing PDF. The available options are:
|
Destination PDF |
Text |
Yes if On Completion parameter is set to Save as |
(Empty) |
DESTINATION="C:\PDFFileName.pdf" |
The new path and/or filename in which to save a copy of the original PDF file. This parameter is active only if the On completion parameter is set to Save as. |
New PDF |
Text |
Yes if Use parameter is set to New PDF |
(Empty) |
NEWPDF="C:\PDFFileName.pdf" |
The path and file name in which to output the newly generated PDF document. This parameter is active only if the Use parameter is set to New PDF. |
Data Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
|
Text |
Yes |
(Empty) |
EXTRACTPDF="C:\temp\source.pdf" |
The path and filename of the source PDF document to extract pages from. |
Password (optional) |
Text |
No |
(Empty) |
SIGNNAME="SignatureName" |
The password required to open the source PDF document (if required). |
Extract page range |
Number |
No |
All |
|
The page(s) to extract from the source PDF document. To remove a single page, enter its page number (e.g., 2or4). To remove specific pages, use a comma (,) to separate each page (e.g., 1,3,5). To remove a range of pages, use a dash (-) to separate the first and last page (e.g., 5-10). This parameter is set to All by default. |
Insert at page |
Number |
Yes |
(Empty) |
LOCATION="3" |
The page number of the target PDF document in which to insert pages. |
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.)
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: Insert pages at "3". Get page "1-3" from PDF "C:\temp\source.pdf". Existing PDF "C:\temp\savedForm.pdf".
<AMPDF ACTIVITY="insert" SOURCE="C:\temp\savedForm.pdf" EXTRACTPDF="C:\temp\source.pdf" LOCATION="3" PAGE="1-3" />