Without more details, I suppose a
My Script is the right way to execute this workflow.
Use the
stamp tool to create and save the stamp template you want to apply on these files. The script will apply the stamp and populate the custom field, using also a custom field to check if the PDFs are already stamped or not. This custom field may be the same (if the field exists them it was already stamped) you will use to store that specific data you talk about.
Here is a generic sample script around this idea:
var StampTemplate = "C:\\PDFStampTemplates\\Template1.stp";
var shell = pdfe.CreateObject("WScript.Shell");
var ProgressBar = pdfe.ProgressBar;
ProgressBar.max = pdfe.SelectedFiles.Count;
for (var i = 0; i < pdfe.SelectedFiles.count; i++) {
ProgressBar.position = i + 1;
var doc = pdfe.SelectedFiles(i);
var filename = doc.filename;
if (!doc.metadata['StampData']) {
pdfe.echo('Processing ' + filename);
shell.Run('"' + shell.ExpandEnvironmentStrings("%PROGRAMFILES%") + '\\PDF-ShellTools\\PDFShellTools.exe" stamp -s Template="' + StampTemplate + '" "' + filename + '""', 0, true);
doc.metadata['StampData'] = 'Your specific data';
doc.metadata.commitchanges();
pdfe.echo(' : done', 0, true);
} else {
pdfe.echo(filename + ' : already stamped');
}
}
pdfe.echo('all done');
This script expects a stamp template at C:\PDFStampTemplates\Template1.stp, and a custom field named "StampData" defined in the
list of custom fields.
In this example the stamp is using static data. If your intention is to stamp dynamic data, check
this other example.
If you need further help, please give me more details.