PDF-ShellTools > General

Adding custom text stamp, from command line

(1/2) > >>

Marco:
I’m looking for a pdf tool for our customer that answer at this requirement:
From batch command (command line) – not GUI – we need to add a stamp with a protocol number with his date, reading these info from external db source…
Could PDF Shell Tools to do this job?

RTT:
Yes, with the use of the DynCustomText parameter

First, you need to create a stamp template, using the stamp tool GUI, to place a dynamic text object, with a [C1] string in it, where do you want the text to appear in the PDF page(s). Create a stamp template like the exemplified at the first attached screenshot, and save it to a "C:\PDFStamps\DynamicCmdLine.stp" named file.

Now you just need to call the stamp tool from the command line, refer the saved template, and pass the text that will replace the [C1] reference.
"C:\Program Files (x86)\PDF-ShellTools\PDFShellTools.exe" stamp StampRules=1 -s Template=C:\PDFStamps\DynamicCmdLine.stp DynCustomText=World C:\PDFs\PDF1.pdf
If you call it without the -s parameter (or from the trial version, that doesn't support the run hidden option) you can see what will be stamped (second screenshot).

conrad.drake:
It works rather nicely, but if the page orientation  (landscape / portrait) varies within the document the stamp doesn't change proportions

RTT:
Under the stamp tool "files" tab, the "stamp mode" options (fit to page and maintain aspect ratio) controls proportionality for when the page dimensions/orientation change. Have you played with these options?
If you are referring to a different problem, please attach a stamped PDF showing how it should look like.

conrad.drake:

--- Quote from: RTT on August 12, 2015, 04:05:33 PM ---Have you played with these options?

--- End quote ---
I've got that working in interactive mode but (in my ignorance) don't know how to set the stamp mode from the CLI

Navigation

[0] Message Index

[#] Next page

Go to full version