These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Batch Processing File Name as watermark

Woodsta
Registered: Jul 18 2011
Posts: 2
Answered

I have approximately 700 documents that I need to apply watermarks to. These are Material Safety Data sheets and the watermark needs to be derived from a combination of static content:
 
"SKU - "
 
and dynamic content:
 
the first 8 characters of the filename.
 
So if I had a file called 12345678 the watermark should appear as:
 
SKU - 12345678
 
I am currently manually adding this information but need to automate as the process will be handed over other staff members and needs to be easily repeatable.
 
My Current Watermark config is:
 
Text: SKU - 12345678
Font: Arial
Size: 18
Rotation: -90
Opacity: 100%
location: appear on top of page
Position: Vertical Distance o..1 inches from Bottom
Horizontal distance 0.1 inches from Right
 
If anyone can assist in helping to provide the required java so that i can batch this i'd very much appreciate it.
  

My Product Information:
Acrobat Pro 9.4, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Accepted Answer
Regarding the watermark, read up on the method addWatermarkFromText().

Regarding the contents of it, you can use this code:

"SKU - " + this.documentFileName.substring(0,8);

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Woodsta
Registered: Jul 18 2011
Posts: 2
Thanks, worked a treat you have no idea how much time you have saved me.

Cheers

Woodsta