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

Creating Watermark from filename by Batch Processing - Acrobat Pro7

hyperkyn
Registered: Jul 8 2009
Posts: 5

Okay,

I would like to add a watermark to a folder of .bmps. The watermark will be the individual/unique filename. Is there a way, using the advanced/batchprocessing/"add watermark and background" function to accomplish this?

I was thinking there could be a special character to point the watermark text value to the filename...

Or is code needed?

danke,
--hyper

try67
Expert
Registered: Oct 30 2008
Posts: 2399
BMPs? Are you sure you're using Acrobat for this? It sounds like a job for Photoshop...

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

hyperkyn
Registered: Jul 8 2009
Posts: 5
try67,

Acrobat works great at both batch watermarking the bmps and reducing size.

i have found the following code (from stevewareham.com) that does almost what i need. But I need to assign the source file name to a variable.


var myTopStamp = "Topstamp";
var myLowerStamp = "Lowerstamp";

var pageAmount = this.numPages; // Finds the length of the PDF

// Stamping is achieved by using the "addWatermarkFromText" method
this.addWatermarkFromText({
cText: "Single page stamp " + myLowerStamp,
nStart: 0,
nEnd: 0,
nFontSize: 8,
nTextAlign: app.constants.align.left,
nHorizAlign: app.constants.align.left,
nVertAlign: app.constants.align.bottom,
nHorizValue: 20, nVertValue: 20
});
try67
Expert
Registered: Oct 30 2008
Posts: 2399
You can't edit BMP files in Acrobat. They have to be converted (or embedded) into a PDF first.
And you can access a file's location using this.path .

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