PDF - Remove |
Declaration
<AMPDF ACTIVITY="delete" SESSION="text" SOURCE="text" PASSWORD="encrypted text" SAVETYPE="text (options)" DESTINATION="text" PAGE="number" />
Description
Deletes one or more pages from a PDF file.
Practical Usage
Ideal for deleting unwanted or irrelevant pages from a PDF file.
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 remove pages. 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). |
On completion | Text (options) | Yes, if Resource is set to File | Save |
|
Specifies how changes to the PDF file are saved upon completion of this activity. The available
options are:
|
Destination PDF | Text | Yes, if On completion is set to Save As | (Empty) | DESTINATION="C:\PDFFileName.pdf" | The path and file name where the modified PDF file is stored. This parameter becomes active and is required if the On completion parameter is set to Save as. |
Pages
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Pages | Number | Yes | (Empty) |
PAGE="1,3,5" |
The pages to remove from 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). |
Example
NOTE:
- 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 deletes multiple pages from a PDF file.
Copy
<AMPDF ACTIVITY="delete" SOURCE="C:\temp\sourceForm.pdf" PAGE="1,3,5" />