Skip to main content
Known Participant
July 23, 2017
Question

How to batch underline all text in all pdf files in a folder ?

  • July 23, 2017
  • 2 replies
  • 3893 views

How to batch underline all text in all pdf files in a folder with acrobat DC pro ?

[Moved from the Adobe Acrobat Reader forum to Editing & Exporting PDFs by moderator.]

.

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
July 23, 2017

​All ​the text in ​all​ the files? What for?

Known Participant
July 29, 2017

Only want to underline or strike through searched text in files. I found a code online but its on color highlighting.

I am looking for something similar to this:i

// I copied it from somewhere online

// Highlight Color

var colHilite = color.yellow;

var oDoc = event.target;

var aAnnts = oDoc.getAnnots({sortBy:"Author"});

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

{

   if(aAnnts.type == "Redact")

   {

      aAnnts.type = "Highlight";

      aAnnts.strokeColor = colHilite;

   }

}

try67
Community Expert
Community Expert
August 18, 2017

Hi,

How can I underline only numbers ? or a list of given numbers ?


You can use the getPageNthWord method to look at the contents of each word, and then decide whether you want to underline it or not.

Bernd Alheit
Community Expert
Community Expert
July 23, 2017

Try a forum for Adobe Acrobat.