PDF - Delete annotation(s)
Declaration
<AMPDF ACTIVITY="delete_annotation" SESSION="text" SOURCE="text" PASSWORD="text (encrypted)" SAVETYPE="text (options)" DESTINATION="text" ANNOTATIONTYPE="text (options)" ANNOTATIONTITLE="text" PAGE="number" />
Description
Deletes one or more annotations from a PDF file.
Practical usage
Used to permanently delete one or more annotations 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 delete annotations. 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. |
Annotation
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Type | Text (options) | Yes | Text |
|
Specifies the type of annotation to delete from the PDF file. The available options are:
|
Delete | --- | --- | --- | --- | Determines the annotations
to delete. 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 annotation | Text | Yes if Type is set to Text or Free Text and Delete is set to Specific annotation | (Empty) | ANNOTATIONTITLE="Note" | The annotation titles to delete.
Manually enter the desired annotation titles in the Title text box. Use a comma to delimit each entry (for example, Note,Comment,Comment2). This parameter becomes active and is required if Delete is set to Specific annotation. NOTE: Annotation titles are case-sensitive. |
Page
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Page range | --- | Yes | All | --- | Specifies the pages to delete annotations from in 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. |
Page(s) | Text | Yes, if Page range is set to Page(s) | (Empty) | PAGE="1,3,5" | If selected, specifies the pages to delete annotations from in 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). |
Examples
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
This sample task deletes all instances of the annotation titled Note from pages 1 and 2 of a PDF file and then saves it using a different file name.
Copy
<AMPDF ACTIVITY="delete_annotation" SOURCE="C:\Temp\SamplePDF.pdf" SAVETYPE="save_as" DESTINATION="C:\Temp\Output.pdf" ANNOTATIONTYPE="FreeText" ANNOTATIONTITLE="Note" PAGE="1,2" />