- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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)
{
var document = (DrawingDocument)application.ActiveDocument;
var printManager = (DrawingPrintManager)document.PrintManager;
printManager.Printer = PrinterSettings.printer;
printManager.PaperSize = PrinterSettings.paperSize;
if (printManager.PaperSize == PaperSizeEnum.kPaperSizeCustom)
{
printManager.PaperHeight = PrinterSettings.customHeight;
printManager.PaperWidth = PrinterSettings.customWidth;
}
// Orientation
printManager.Orientation = PrinterSettings.orientation;
printManager.ColorMode = PrinterSettings.color;
printManager.AllColorsAsBlack = PrinterSettings.allColorsBlack;
printManager.PrintRange = PrinterSettings.whatToPlot;
printManager.NumberOfCopies = PrinterSettings.numberOfCopies;
// Scale
printManager.ScaleMode = PrinterSettings.scale;
printManager.Scale = PrinterSettings.customScale;
printManager.TilingEnabled = PrinterSettings.tiling;
printManager.RemoveLineWeights = PrinterSettings.lineWeights;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This sounds exacly like another post. See link below.
Wesley Crihfield
(Not an Autodesk Employee)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What is PrinterSettings in your original post? That's a class in System.Drawing.Printing and doesn't have any of the properties you're referencing. I haven't had any issues using kPrintGreyScale or kPrintColorPalette in 2017 (IDWs printed to the Microsoft PDF driver or Adobe PDF driver). You may have shown an abbreviated version in your latest post, but you don't create a new DrawingPrintManager object. You have to refer to the DrawingPrintManager for a specific drawing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello jjstr8,
PrinterSettings is not(in this case) a class in System.Drawing.Printing. It's a class I use for Reading and setting values from a user config file.
The DrawingPrintManager is references as it's shown in my original post
var document = (DrawingDocument)application.ActiveDocument;
var printManager = (DrawingPrintManager)document.PrintManager;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I just ran my printing code in debug and checked ColorMode after setting is to kPrintColorPalette. It comes back as kPrintDefaultColorMode. I guess the issue still exists. It doesn't seem to cause an issue. It still lets me choose between color and greyscale. I also found out that the Microsoft Print to PDF driver is ignoring the ColorMode setting. It doesn't appear to be an option in its Printing Preferences. At least using AllColorsAsBlack does something, just not to shaded views.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So it's not just me having the problem. Thank you for your input.
Hopefully someone at the forum reading this post have experienced the same problem and have an solution(if any exists)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Issue with Inventor 2024 is still present... can't change .ColorMode to kPrintColorPalette.