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

Using Action Wizard to add a page containing a set text piece. Adobe Acrobat Pro DC 32-bit

Community Beginner ,
Apr 13, 2021 Apr 13, 2021

Copy link to clipboard

Copied

Hi,

 

New.  I'm wanting to - with one click - add a page to the beginning of the document and in the vertical & horizonal center write the word "Test".  Obviously I dont want the word "test" but if I can figure this seemingly-simple thing out them I can accomplish my goal. 

 

There's a few ways I can think of doing this, whether they work or not, I dont know.  Maybe I'm missing something.  I'm thinking Action Wizard.  The Action Wizard allows a blank page to be added in front of page 1, but after that I'm running into problems.  I'm thinking...

 

  1. Do as I said above - write "Test".  However when I use the Action Wizard to Add Text I cannot command Adobe to write "Test" automatically.  There's no option to specify settings for the Add Text tool.  So, I have to type in "Test" every time I activate the custom action.  Oh and I have to specify that the text is to be placed at the very center of page.  So that's not working.
  2. Since the text is going to always be the same I could create an image of the text then have Adobe insert a page and then drop an image onto that blank page.  But like #1, there's no option I see to specify a certain filename ahead of time, I have to specify the filename when I run the action.  So that's cumbersome too.
  3. Instead of text-text, use watermark-text.  But ... same thing.

 

I'm sure I'm missing something.  How can I tell Adobe to do a very simple thing like insert a blank page one then write "Test" on the very center of that blank page? 

 

Pseudocode:  Insert blank page 1; horizontal = center; vertical = center; font = whatever; size = whatever; color = whatever; text = "Test".  Write.Text.Page=1

 

Thank you.

TOPICS
Edit and convert PDFs , General troubleshooting , How to

Views

990

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

correct answers 1 Correct answer

Community Expert , Apr 21, 2021 Apr 21, 2021

Click the Execute JavaScript command and make sure that the "Prompt User" check-box underneath it is not ticked.

Votes

Translate

Translate
Community Expert ,
Apr 13, 2021 Apr 13, 2021

Copy link to clipboard

Copied

You can use this code to do it:

 

 

this.newPage(-1);
this.addWatermarkFromText({nStart: 0, cText: "TEST"});

 

 

The second command can of course be customized in all kinds of ways regarding the text's appearance, location, etc., but for what you described it should do the trick.

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 ,
Apr 13, 2021 Apr 13, 2021

Copy link to clipboard

Copied

Cool.  I'll try this and let you know.

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 ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

Again, thank you for the response.  I've tried the code above.  However, I'm running into a problem where I'm getting the Javascript Editor with the code instead of actually executing the code.  Screenshot attached.  I'm sure I'm doing this wrong, so I'll try more options as I get time.Screenshot 2021-04-21 081826.jpg

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 ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

Click the Execute JavaScript command and make sure that the "Prompt User" check-box underneath it is not ticked.

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 ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

LATEST

"I have discovered fire!" 

That's the feeling I got when this worked 🙂

 

Thank you.

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