Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
628 Views, 7 Replies

Can't set kPrintColorPalette, DrawingPrintManager

Hello,
I'm having trouble setting the ColorMode for DrawingPrintManager.
 Setting the ColorMode to kPrintGrayScale and kPrintDefaultColorMode works fine, the problem is when I'm trying to set the ColorMode to kPrintColorPalette nothing happens. By some strange reason it will always be set to kPrintDefaultColorMode?!? (The AllColorsAsBlack setting is false)

 

        private void PrintDrawing(Application application)
        {
            var document = (DrawingDocument)application.ActiveDocument;
            var printManager = (DrawingPrintManager)document.PrintManager;
            // Printer
            printManager.Printer = PrinterSettings.printer;
            // Papersize
            printManager.PaperSize = PrinterSettings.paperSize;
            if (printManager.PaperSize == PaperSizeEnum.kPaperSizeCustom)
            {
                printManager.PaperHeight = PrinterSettings.customHeight;
                printManager.PaperWidth = PrinterSettings.customWidth;
            }
           
            // Orientation
            printManager.Orientation = PrinterSettings.orientation;
            // Color         
            printManager.ColorMode = PrinterSettings.color;
            printManager.AllColorsAsBlack = PrinterSettings.allColorsBlack;
            // Range
            printManager.PrintRange = PrinterSettings.whatToPlot;
            // Copies
            printManager.NumberOfCopies = PrinterSettings.numberOfCopies;
           
            // Scale
            printManager.ScaleMode = PrinterSettings.scale;
            printManager.Scale = PrinterSettings.customScale;
            // Misc
            printManager.TilingEnabled = PrinterSettings.tiling;
            printManager.RemoveLineWeights = PrinterSettings.lineWeights;
            printManager.SubmitPrint();
        }