I did some experimenting and arrived at this solution. It works well, basically I treated a PDF as a Graphic and sent it to the printer instead of a Canvas.
I then get the native OSX printer dialog. Where I can make a few choices and hit print. So not as straight forward as I thought it would be, but all the examples here on the Xojo forum helped out. I would love to optimize this further by setting the proper settings in the print dialogs from my Xojo app so that a single click accomplishes all.
Dim ps As New PrinterSetup
Dim theLabel As Picture
Dim g As Graphics
Dim Scale As Double = Val(Main.ccSales.tf_Scale.Text)
// This is the actual size of the label from shipEngine
Dim Width As Double = 275
Dim Height As Double = 432
// set the resolution to 300 DPI for printing
ps.MaxHorizontalResolution = 300
ps.MaxVerticalResolution = 300
// Load the label into a Graphic, in this case the PDF
theLabel = Picture.Open(Main.ccSales.LabelFile)
If ps.PageSetupDialog Then
g = OpenPrinterDialog(ps, Nil)
//Draw the picture to the printer instead of canvas
g.DrawPicture(theLabel, Val(Main.ccSales.tf_XPos.Text), Val(Main.ccSales.tf_YPos.Text), Width * Scale, Height * Scale, 0, 0, Width, Height)
If I need to view the label I send it to the Canvas and display it. Anybody know how to preset the Print Dialog options so that I can bypass it (meaning no data entering ) and just print?