Stamp text
Draws a line of text over pages: a watermark, a label, a status.
Place a stamp
A stamp's x and y count in points from the bottom-left corner of the page, 72 points to the inch. A Letter page measures 612 by 792 points, an A4 page 595 by 842. Without pages, a stamp goes on every page.
curl \
--request POST http://localhost:3000/forms/pdf/stamp-text \
--form files=@report.pdf \
--form text=CONFIDENTIAL \
--form x=120 \
--form y=250 \
--form fontSize=36 \
--form color=#b42318 \
--form opacity=0.4 \
--form rotation=30 \
-o report.pdf
rotation turns the text counter-clockwise around x and y. font takes one of the 14 standard PDF fonts, Helvetica by default, which draw Western European text; Symbol and ZapfDingbats draw it as symbols. Other text, Cyrillic or Chinese for instance, is drawn with a font installed in the image, one of the family of font when it has the characters, embedded in the PDF. Letters that join or reorder, as Arabic and Devanagari do, come out one by one. Text no installed font has the characters of answers 400: install a font that does.
In a list of stages
The stage also runs in a list on /forms/pdf/pipe, and on the PDFs a Chromium or LibreOffice conversion makes, in its stages field:
curl \
--request POST http://localhost:3000/forms/pdf/pipe \
--form files=@report.pdf \
--form 'stages=[
{ "op": "stamp-text", "text": "CONFIDENTIAL", "x": 120, "y": 250, "fontSize": 36, "color": "#b42318", "opacity": 0.4, "rotation": 30 }
]' \
-o report.pdf
A stamp only covers what's under it: redact to remove content for good.