Gray scale PDF printing

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);

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Currently the Greyscale/mono options are not enabled, due to inconsistent support across physical and virtual printers.

You can either pre-process the PDF, see link below, or edit the settings of the target printer your self.