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

Insert text in Batch

Community Beginner ,
Mar 05, 2018 Mar 05, 2018

I have 16,000 PDF drawing files, depending on the job I need 30 to 250 of them.  The current work flow is to print all of them and then rubber stamp them with the job number.  To complicate things none of the drawings have a blank space in the same spot.  My thought is to manually insert a text box in each of the drawing.... Then the hard part... Insert the number 2108-Y-1234 into the text box and print the drawings.  No need to save the PDFs because the number will change for the next job.

Thank you for you help,

Tim

TOPICS
Edit and convert PDFs
3.9K
Translate
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
1 ACCEPTED SOLUTION
Adobe Employee ,
Mar 05, 2018 Mar 05, 2018

Tim,

try67 has the idea.  Mind you this is very basic but you could use this as a starting point for JavaScript to put into the Action

//1st JavaScript populates the value of the text field "2108-Y-1234" into each document that has a text field

// with the logical name "partNumber".

var f = this.getField("partNumber"); f.value = "2108-Y-1234";

//2nd JavaScript which prints the document silently to the last used printer and then closes the document.

//If you put the printer name  into the Property "printerName" instead of "",  then it will print to the same printer every time.

var pp=this.getPrintParams();

flag = pp.constants.flagValues;

pp.interactive = pp.constants.interactionLevel.automatic;pp.flags = pp.flags | flag.setPageSize;

pp.printerName = "";

this.print({bUI: true,bSilent: true,bShrinkToFit: true, bPrintAsImage:true, printParams:pp});

this.closeDoc();

* Note, this isn't meant to be perfect but just an idea of what you could do.

View solution in original post

Translate
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 ,
Mar 05, 2018 Mar 05, 2018

This might be possible using an Action, if you have Acrobat Pro.

You can use a script to add a text field to a fixed position, populate it with the job number, and then print the file.

However, the script can't know if there's content in the location where you insert the text (well, unless it's other text, but that's quite complicated).

Translate
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
New Here ,
Apr 06, 2021 Apr 06, 2021

Hi try67, 

How can I go about getting a script "to add a text field to a fixed position"?

I need a script like this urgently. 

Thanks in advance, 

Jack

Translate
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 06, 2021 Apr 06, 2021
LATEST

Since you contacted me privately, let's continue the discussion there...

Translate
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
Adobe Employee ,
Mar 05, 2018 Mar 05, 2018

Tim,

try67 has the idea.  Mind you this is very basic but you could use this as a starting point for JavaScript to put into the Action

//1st JavaScript populates the value of the text field "2108-Y-1234" into each document that has a text field

// with the logical name "partNumber".

var f = this.getField("partNumber"); f.value = "2108-Y-1234";

//2nd JavaScript which prints the document silently to the last used printer and then closes the document.

//If you put the printer name  into the Property "printerName" instead of "",  then it will print to the same printer every time.

var pp=this.getPrintParams();

flag = pp.constants.flagValues;

pp.interactive = pp.constants.interactionLevel.automatic;pp.flags = pp.flags | flag.setPageSize;

pp.printerName = "";

this.print({bUI: true,bSilent: true,bShrinkToFit: true, bPrintAsImage:true, printParams:pp});

this.closeDoc();

* Note, this isn't meant to be perfect but just an idea of what you could do.

Translate
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