Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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).
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Since you contacted me privately, let's continue the discussion there...
Copy link to clipboard
Copied
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.

