Hello,
using the following code sequence, we are trying to print a PDF document on a Color Printer. We would like to get the output in as a grayscale image, nevertheless we get a color print all the time, no matter which paramters we pass to the printer driver or which settings we use in the printer selection dialog.
BTW: We’re using HPs UPD printer driver in conjunction witrh a HP Pagewide printer.
Is there any way to get a monochome grayscale output?
Regards,
Axel
PrinterMode printerMode = new PrinterMode();
printerMode.SetScaleType(PrinterMode.ScaleType.e_ScaleType_ReduceToOutputPage);
printerMode.SetAutoCenter(true);
printerMode.SetAutoRotate(true);
printerMode.SetCollation(true);
printerMode.SetCopyCount(1);
printerMode.SetDPI(600); // regardless of ordering, an explicit DPI setting overrides the OutputQuality setting
printerMode.SetDuplexing(PrinterMode.DuplexMode.e_Duplex_None); // Kein Duplexdruck
printerMode.SetNUp(PrinterMode.NUp.e_NUp_1_1, PrinterMode.NUpPageOrder.e_PageOrder_LeftToRightThenTopToBottom);
printerMode.SetOrientation(PrinterMode.Orientation.e_Orientation_Portrait);
printerMode.SetOutputAnnot(PrinterMode.PrintContentTypes.e_PrintContent_DocumentAndAnnotations);
// If the XPS print path is being used, then the printer spooler file will
// ignore the grayscale option and be in full color
printerMode.SetOutputColor(PrinterMode.OutputColor.e_OutputColor_Grayscale);
printerMode.SetOutputPageBorder(false);
printerMode.SetOutputQuality(PrinterMode.OutputQuality.e_OutputQuality_Medium);
printerMode.SetPaperSize(new Rect(0, 0, 612, 792));
PageSet pagesToPrint = new PageSet(1, pdfdoc.GetPageCount(), PageSet.Filter.e_all);