top of page

Javascript to change annotation types in Acrobat

Using javascript posted here by Evermap, and copied below you can automatically transform annotations from one type in Adobe Acrobat to another type. It will not only allow you to convert highlights, underlined text, and crossed out text, but also to change from proposed redactions to any one of these annotations - but not vice versa.


In order to add the script to a new action in Acrobat, select the Action Wizard tool and then click on 'New Action', and choose 'Execute JavaScript' from the 'More Tools' drop down menu.




Click on 'Specify Settings' and enter the script in the editor. Set the type you want to find on the first highlighted line in the below screen grab, and the type you want to add in on the second line. If you want to reference crossed out text use the type, 'CrossOut'.



Uncheck the 'Prompt User' box, and then add the Save step to the action, so you will not be prompted to save each file when the action runs.




After saving and running the action, you can process multiple files by selecting the options in the drop down menu to add files or an entire folder.




The script can be used to convert multiple proposed redactions in multiple PDF files like this:




The script will convert one or more lines of continuous text selected for a redaction, but it will not convert a large block of text set for redaction.



The action will give this result:







You can add a second javascript to the same action to specify the highlighting color you want the action to convert annotations or proposed redactions to:


this.syncAnnotScan();

var annots = this.getAnnots();


for (var i = 0; i < annots.length; i++) {

if (annots[i].type == "Highlight") {

annots[i].strokeColor = color.yellow;

}

}







try

{

this.syncAnnotScan();

for (var nPage = 0; nPage < this.numPages; nPage++)

{

// get all annotations on the page

var Annots = this.getAnnots({

nPage:nPage

});

// process each annotation

if (Annots != null)

{

for (var i = 0; i < Annots.length; i++)

{

if (Annots[i].type == "StrikeOut")

{

Annots[i].type = "Highlight";

}

}

}

}

}

catch(e)

{

app.alert(e);

}

4 comentarios


WKDU TRBD
WKDU TRBD
06 ene

代发外链 提权重点击找我;

谷歌蜘蛛池 谷歌蜘蛛池;

Fortune Tiger…

Fortune Tiger…

谷歌权重提升/ 谷歌权重提升;

谷歌seo 谷歌seo;

谷歌霸屏 谷歌霸屏

蜘蛛池 蜘蛛池

谷歌快排 谷歌快排

Google外链 Google外链

谷歌留痕 谷歌留痕

Gái Gọi…

Gái Gọi…

Dịch Vụ…

谷歌霸屏 谷歌霸屏

负面删除 负面删除

币圈推广 币圈推广

Google权重提升 Google权重提升

Google外链 Google外链

google留痕 google留痕

Me gusta

BFVY IRTO
BFVY IRTO
28 dic 2024

代发外链 提权重点击找我;

游戏推广 游戏推广;

Fortune Tiger Fortune Tiger;

Fortune Tiger Slots Fortune…

谷歌马甲包/ 谷歌马甲包;

谷歌霸屏 谷歌霸屏;

מכונות ETPU מכונות ETPU;

;ماكينات اي تي بي…

آلات إي بي بي…

ETPU maşınları ETPU maşınları;

ETPUマシン ETPUマシン;

ETPU 기계 ETPU 기계;

Me gusta

WKDU TRBD
WKDU TRBD
28 dic 2024

代发外链 提权重点击找我;

谷歌蜘蛛池 谷歌蜘蛛池;

Fortune Tiger Fortune Tiger;

Fortune Tiger Slots Fortune…

谷歌权重提升/ 谷歌权重提升;

谷歌seo 谷歌seo;

מכונות ETPU מכונות ETPU;

Машини ETPU Машини ETPU

ETPU-Maschinen ETPU-Maschinen

EPS-машины EPS-машины

ЭПП-машины ЭПП-машины� بي يو

ETPU maşınları ETPU maşınları

ETPUマシン ETPUマシン

ETPU 기계 ETPU 기계

Me gusta

AVXJ KAZD
AVXJ KAZD
26 dic 2024

代发外链 提权重点击找我;

google留痕 google留痕;

Fortune Tiger Fortune Tiger;

Fortune Tiger Fortune Tiger;

Fortune Tiger Slots Fortune…

站群/ 站群;

万事达U卡办理 万事达U卡办理;

VISA银联U卡办理 VISA银联U卡办理;

U卡办理 U卡办理;

万事达U卡办理 万事达U卡办理;

VISA银联U卡办理 VISA银联U卡办理;

U卡办理 U卡办理;

온라인 슬롯 온라인 슬롯;

온라인카지노 온라인카지노;

바카라사이트 바카라사이트;

EPS Machine EPS Machine;

EPS Machine EPS Machine;

EPS Machine EPS Machine;

EPS Machine EPS Machine;

Me gusta
bottom of page