Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to print to PDF?
Answer: This code below shows how to redirect printing to a PDF file on Mac OS X.
// get Xojo printer setup
dim p as new PrinterSetup

// now put it into NSPrintInfo to manipulate
dim n as new NSPrintInfoMBS
n.SetupString = p.SetupString

// change destination to file
dim f as FolderItem = SpecialFolder.Desktop.Child("test.pdf")

// move back
p.SetupString = n.SetupString

// and print as usual
dim g as Graphics = OpenPrinter(p)
g.DrawString "Hello World", 20, 20
Notes: And you can use normal graphics class for that.

Feedback, Comments & Corrections

MBS Xojo PDF Plugins