I’m pretty new to Retrobatch. I have a bunch of PDFs and I would like to extract the first page of each file, scale the page to a specific size and save the new image as a GIF file.
This is a little tricky, but possible. First, add a JavaScript node before the write images node. Then delete all the boilerplate code and paste the following in:
function processAsset(document, jsnode, asset) {
var s = asset.outputFileName().replace(" page 1.", ".")
asset.setOutputFileName(s);
return true;
}
That little snippet of code removes the page 1 bit, and then sets the output file name to the new string.
Would something like this allow me to rename/substitute text? For instance, instead of _orig at the end of the filename, I’d like to replace that bit of text with “_optimized”. Or is there already a rename node? Thanks!