Copy link to clipboard
Copied
Hi,
For a year or so I've commented with text selection underlining not text selection highlights. A new reference/pdf software program I am switching to (citavi) requires me to convert all my underline annotations to highlite annotations, or at least to add highlites over the same text. (Citavi only recognizes highlights from external pdf viewers).
Is there a way to do this? I use Adobe Acrobat Pro DC.
Thank you
It's easy to convert using JavaScript. The following script run from the interactive JavaScript console (Ctrl+J) will do it, though you may want to add additional code to set the color to something else.
// Get an array of all of the annotations in the document
syncAnnotScan();
var annots = getAnnots();
// Loop through the comments
// and convert any underlines to highlights
for (var i = 0; i < annots.length; i += 1) {
if (annots.type === "Underline") {
annots.type = "Highlight";
}
}
To exe
...Copy link to clipboard
Copied
It's easy to convert using JavaScript. The following script run from the interactive JavaScript console (Ctrl+J) will do it, though you may want to add additional code to set the color to something else.
// Get an array of all of the annotations in the document
syncAnnotScan();
var annots = getAnnots();
// Loop through the comments
// and convert any underlines to highlights
for (var i = 0; i < annots.length; i += 1) {
if (annots.type === "Underline") {
annots.type = "Highlight";
}
}
To execute it, paste all of the code shown above, select it all, and press Ctrl + Enter. All underline comments will be changed to Highlights.
Copy link to clipboard
Copied
You can even use the code above as a part of an Action and process all of your files at once. I will just change it a bit so it doesn't fail if there are no comments in the file, and use this code instead:
// Get an array of all of the annotations in the document
this.syncAnnotScan();
var annots = getAnnots();
if (annots!=null) {
for (var i = 0; i < annots.length; i += 1) {
if (annots.type == "Underline") {
annots.type = "Highlight";
}
}
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now