Davide
Davide

Reputation: 1

Converting DITA-OT PDF2 plugin output to grayscale with AntennaHouse Formatter v73

I'm currently working with DITA-OT 4.1.1 and AntennaHouse Formatter v73 on stylesheet development for PDF generation: until now I have only worked with colored output PDFs, but in the future I will also need to be able to produce the PDF also in grayscale (just to be clear, not only the images but all the content should be in grayscale) I was hoping there was some easy switch that can be added in the custom plugin or some other minor configuration to be done... is this the case?

Haven't tried much, I've only found grayscale conversion at images level, but i was hoping to not having to address each element instead of the single file as a whole (maybe as a postprocess step?)

Upvotes: 0

Views: 57

Answers (2)

Tony Graham
Tony Graham

Reputation: 8068

For PDF output, you can use the -prc command-line option; e.g. -prc 3 to turn all RGB into DeviceGray. (See https://www.antenna.co.jp/AHF/help/en/ahf-xslcmd.html#cmd-prc)

For things like font color, you can use rgb-icc(#Grayscale, <Scale>) to specify colors as grayscale. See https://www.antenna.co.jp/AHF/help/en/ahf-ext.html#Grayscale and the Grayscale sample from the XSL-FO Samples Collection (https://www.antennahouse.com/xsl-fo-samples#color-Gray-1) with PDF at https://www.antennahouse.com/hubfs/xsl-fo-sample/color/color-Gray-1.pdf

Upvotes: 1

Kevin Brown
Kevin Brown

Reputation: 8857

You could always write that "easy switch" in a template. Do you have some code to show? Or do you think the PDF producing product should have a switch (Grayscale, ...).

The "..." in that statement is important. Like RGB, CMYK, RGB->CMYK, and of course we havent even thought about Pantone 148 or some other color.

The choice of the color space and the concepts you wish to apply to all of those are not simple and they should be up to you as the document creator and not the software writer trying to "imagine" what you want for every case.

Upvotes: 0

Related Questions