Thanks again Lars,
It works great on Mac… https://forum.xojo.com/10842-saving-as-pdf-on-mac
But. now that windows can do PDF printing, how can I modify that so that when I click my PDF Print pushbutton it creates a pdf with the specified name and location without showing a dialog?
I have this that Lars Brennicke recommended for Mac which works great on Mac…
Dim myAppFilesFolder As Folderitem myAppFilesFolder = SpecialFolder.Documents.Child("my App Files Folder") If not myAppFilesFolder.exists then myAppFilesFolder.CreateAsFolder Dim pdfFile as folderItem pdfFile = myAppFilesFolder.Child(Self.Title + ".pdf") HxprnPrinterSetup.SetupString = App.pdfPrintSettings.Replace("PATHTOPDF", pdfFile.NativePath.ReplaceAll("&","&").ReplaceAll("<","<").ReplaceAll(">",">")) g = OpenPrinter(HxprnPrinterSetup)
It also works great on Windows too, but a dialog is presented, the name of the file is displayed in the dialog box but it asks for a location.