PDF - Decrypt
Declaration
<AMPDF ACTIVITY="decrypt" SESSION="text" SOURCE="text" PASSWORD="text (encrypted)" SAVETYPE="text (options)" DESTINATION="text" />
Description
Decrypts an encrypted PDF file which has an owner password set.
Practical usage
Used to decrypt a encrypted PDF file to enable editing, printing, copying, and modifying.
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 path and file name of the PDF to decrypt. 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. |
Example
NOTE:
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Description
NOTE:
Before attempting to run this task, update the SOURCE and DESTINATION parameters to use a PDF file of your own.
This sample task decrypts a PDF file and then saves it as using a different file name.
Copy
<AMPDF ACTIVITY="decrypt" SOURCE="C:\temp\sourceFile.pdf" SAVETYPE="save_as" DESTINATION="C:\temp\destFile.pdf" />