Font font = Font.createTrueTypeFont(thisDoc,this.getClass().getResourceAsStream(fontLocation), true, true);
Stamper s = new Stamper(Stamper.e_font_size, fontSize, 0);
s.setFont(font);
s.setFontColor(new ColorPt(0, 0, 0, 1));
We are trying to produce PDF/X-1a compliant output but the resulting font seems to end with an RGB color mode. We were hoping “s.setFontColor(new ColorPt(0, 0, 0, 1));” would cause the CMYK color mode to be used. Are we improperly setting the font color or is the Stamper the wrong tool for the job.
Stamper will only stamp text in RGB. One option may be for you to create CMYK text in a new PDF page and then use Stamper.StampPage() instead of StampText():