ralfstuckert/pdfbox-layout

Request: Support CMYK colors for text markup

Opened this issue · 0 comments

At the moment, color markup for text supports RGB colors only (formatted as a hex string, i. e. {color:#ff0000}). I would kindly like to request the addition of CMYK colors as well.

Internally, the color is currently set in TextLine via setNonStrokingColor() accepting an AWT-Color parameter and converting this to an RGB-PDColor. There is an overload of this method directly accepting a PDColor as well - which does support CMYK also. Usage of this overload could minimize the actual work that has to be done.

For the markup, maybe something like {color_rgb:#ff0000} and {color_cmyk:75,15,0,20} would be viable?