Message 1 of 2
Printing Margins not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
Just a quick observation of a possible small bug? I've just updated a 2021 Addin to 2023. The Printer Parameter properties UserDefinedMarginX and UserDefinedMarginY were replaced with OriginOffsetX and OriginOffsetY in 2022. I have found that the new properties have no affect on the margins, ie, they appear to stay at zero. Even though the old properties were depreciated in 2022 they still work in 2023 so my old code still works thankfully.
// Obsolete as of 2022 but still works in 2023. Good job it still works
// because its replacement has no affect!
// pm is a PrintManager object (doc.PrintManager)
// 0.2 inches = 5mm approx
pm.PrintSetup.CurrentPrintSetting.PrintParameters.UserDefinedMarginX = 0.2;
pm.PrintSetup.CurrentPrintSetting.PrintParameters.UserDefinedMarginY = 0.1;
// New properties OriginOffsetX and OriginOffsetY has no affect on the margin
// OriginOffsetX/Y is in feet
pm.PrintSetup.CurrentPrintSetting.PrintParameters.OriginOffsetX = 5 / App.MM_IN_FEET;
pm.PrintSetup.CurrentPrintSetting.PrintParameters.OriginOffsetY = 2.5 / App.MM_IN_FEET;