• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Community Beginner ,
Jul 23, 2017 Jul 23, 2017

Copy link to clipboard

Copied

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.]

.

TOPICS
Edit and convert PDFs

Views

2.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 23, 2017 Jul 23, 2017

Copy link to clipboard

Copied

Try a forum for Adobe Acrobat.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 23, 2017 Jul 23, 2017

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 29, 2017 Jul 29, 2017

Copy link to clipboard

Copied

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;

   }

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 29, 2017 Jul 29, 2017

Copy link to clipboard

Copied

I still don't understand why you would want to do it, but you can use this script:

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

    var numWords = this.getPageNumWords(p);

    for (var i=0; i<numWords; i++) {

        var wordQuads = this.getPageNthWordQuads(p,i);

        this.addAnnot({page: p, type: "Underline", quads: wordQuads});

    }

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 29, 2017 Jul 29, 2017

Copy link to clipboard

Copied

Thank you MVP.

But i request you to give here the complete code here as I am not expert in JS.

Will it work like the copied code and will underline or strike through ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 29, 2017 Jul 29, 2017

Copy link to clipboard

Copied

That is the complete code, and it will underline every word in the file.

On Sat, Jul 29, 2017 at 7:48 PM, uglyp37942060 <forums_noreply@adobe.com>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 30, 2017 Jul 30, 2017

Copy link to clipboard

Copied

No need to declare variables like the highlight code ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 30, 2017 Jul 30, 2017

Copy link to clipboard

Copied

What is the "highlight code"?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 31, 2017 Jul 31, 2017

Copy link to clipboard

Copied

// I uglyphoto 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;

   }

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

Do you mean the highlight color? It's not necessary to specify it, but it's possible if you want to... In the code above replace line #5 with:

this.addAnnot({page: p, type: "Underline", quads: wordQuads, strokeColor: color.yellow});

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

Thank you. Will it give any instruction as pop-ups to click ? I want to avoid any type of pop-up window to click again and again for every file.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

If you un-tick the "Prompt User" box, then no. Also make sure you add a Save command after the Execute JavaScript command...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

Thanks again. How to add a Save command ? Whats the command ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

It's one of the built-in commands in the Action Wizard, under Save & Export.

On Wed, Aug 2, 2017 at 12:37 AM, uglyp37942060 <forums_noreply@adobe.com>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 18, 2017 Aug 18, 2017

Copy link to clipboard

Copied

Hi,

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 18, 2017 Aug 18, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 18, 2017 Aug 18, 2017

Copy link to clipboard

Copied

Please help me with that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 18, 2017 Aug 18, 2017

Copy link to clipboard

Copied

LATEST

Send me a PM or email me at try6767 at gmail.com and we could discuss it further.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines