Closed Mr-Vincent closed 1 year ago
i figure it out. Cause my pdf page didn't have any other color except black and white,so i modify source code like this
@Override
public void setColor(FSColor color) {
// if (color instanceof FSRGBColor) {
// this._desiredPageState.fillColor = color;
// this._desiredPageState.strokeColor = color;
// } else if (color instanceof FSCMYKColor) {
// this._desiredPageState.fillColor = color;
// this._desiredPageState.strokeColor = color;
// } else {
// assert(color instanceof FSRGBColor || color instanceof FSCMYKColor);
// }
// todo 这里强制使用黑色
FSCMYKColor fscmykColor = new FSCMYKColor(0,0,0,1);
this._desiredPageState.fillColor = fscmykColor;
this._desiredPageState.strokeColor = fscmykColor;
}
I generate a pdf file with my html template for printer,but the color mode of output file was not supported for printer.especially the black color which presented in css was '#000000' ,but the cmyk color is not the pure black. i can't figure it out.How can i output pdf file with cmyk color mode?