iLogic Print Code - How to set paper size?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have the following iLogic code for printing, it works great other than I can not get it to print Ledger/11x17. No matter how I try setting the paper size it refuses to print anything except Letter/8.5x11. Anyone have any other suggestions on how to set paper size?
'Print Setup
'[
Dim oDrgDoc As DrawingDocument
oDrgDoc = ThisApplication.ActiveDocument
' Set reference to drawing print manager' DrawingPrintManager has more options than PrintManager' as it's specific to drawing document
Dim oDrgPrintMgr As DrawingPrintManager
oDrgPrintMgr = oDrgDoc.PrintManager
' Set the printer name' comment this line to use default printer or assign another one
'oDrgPrintMgr.Printer = "\\kcidc2012\EngineeringSharp_Ledger"
'oDrgPrintMgr.Printer = "EngineeringSharp_Ledger"
oDrgPrintMgr.Printer = "\\kcidc2012.kciinc.net\EngineeringSharp_Ledger"
'Set the paper size , scale and orientation
oDrgPrintMgr.ScaleMode = kCustomScale
oDrgPrintMgr.ScaleMode = PrintScaleModeEnum.kPrintBestFitScale
'oDrgPrintMgr.PaperSize = PaperSizeEnum.kPaperSizeLedger
oDrgPrintMgr.PaperSize = 14338
oDrgPrintMgr.PrintRange = kPrintCurrentSheet
oDrgPrintMgr.Orientation = kLandscapeOrientation
oDrgPrintMgr.PaperSource = 2
oDrgPrintMgr.AllColorsAsBlack = True
oDrgPrintMgr.SubmitPrint
']

