Convert the colors
Converts every color of a PDF to one color space.
POST/forms/pdf/convert-colors
Form data
Options
curl \
--request POST http://localhost:3000/forms/pdf/convert-colors \
--form files=@report.pdf \
--form target=gray \
-o report.pdf
target takes cmyk for a print shop, gray for black and white printing, rgb for screens, or output-intent for the one the PDF declares.
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": "convert-colors", "target": "gray" }
]' \
-o report.pdf