PDF - Clear Signatures

Declaration

<AMPDF ACTIVITY="clear" SOURCE="text" PASSWORD="encrypted text" 
SAVETYPE="text (options)" DESTINATION="text" SIGNNAME="text" />

Description: Removes all digital signatures contained in a PDF document or a specific signature according to its name.

A signature can only be removed if the system or user has access to the "private" key used to generate the signature in the first place. For example, if user A signs a PDF, only user A can un-sign that PDF.

Practical Usage

Can be used to remove invalid signatures or clear all embedded signatures in a PDF document to alter or re-sign the 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:

  • File (default) - Specifies that the source PDF derives from a file located on the system. This option is normally chosen if only a single activity is required to complete an operation.

  • Session - Specifies that the source PDF is obtained from a pre-configured session created in an earlier step with the use of the PDF - Create session activity. This options is normally chosen if a combination of activities within the same action group are required. Linking several activities to a single session eliminates redundancy and improves efficiency. Several sessions can exist in a single task. In addition, multiple sessions can run simultaneously without interference.

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

  1. PDFDOCUMENTFROM="existing_file"

  2. PDFDOCUMENTFROM="new_file"

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:

  • Existing PDF (default) - Clears signatures from an existing PDF document.

  • New PDF - (Not supported)

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

  1. SAVETYPE="save"

  2. SAVETYPE="do_not_save"

  3. SAVETYPE="save_as"

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:

  • Save (default) - Changes will be saved under the PDF document's original file name.

  • Do not save changes - Any changes this activity made to the existing PDF document will not be saved.

  • Save As - Changes will be saved to a new path and filename.

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.

Signature Parameters

Property

Type

Required

Default

Markup

Description

All signatures

 

 

 

 

If enabled, specifies that all signatures embedded in the PDF document will be removed. If disabled, other parameters become available allowing for the selection of a specific signature. This is a visual mode parameter used during design time, thus, contains no markup. This parameter is enabled by default.

Specific signature name

Text

No

(Empty)

  1. SIGNNAME="SignatureName"

  2. SIGNNAME="Sign1,Sign2"

The name of the signature(s) to remove. Use a comma (,) to indicate more than one signature (e.g., SignatureName1,SignatureName2,SignatureName4). A Get signature(s) activity can be used prior to this step to retrieve information in regards to individual signatures contained in a PDF document. This parameter is active only if the All signatures parameter is disabled.

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: Clear all signatures. New PDF "C:\temp\NewPDF.pdf".

<AMPDF ACTIVITY="clear" PDFDOCUMENTFROM="new_file" NEWPDF="C:\temp\NewPDF.pdf" />