Printing a report with no margin, automatic, without dialog, posible?

I’m printing a report to a PDF Printer and then attach the pdf file to database.
I want to do it automatically without user intervention, otherwise it wouldn’t have sense.

I could do it but what I dont know how to achieve, is getting a full page report, without margins.

I’ve tryed replacing the ps.SetupString like

replaceAll(NSRightMargin, 0)
replaceAll(NSRightMargin, 0)
replaceAll(NSRightMargin, 0)
replaceAll(NSRightMargin, 0)

with no luck.
Even tryed setting objects in report at -x (left) , -x (top) but nothing changed.

It’s a MacOS/Windows App.

Thank you all.

As of today you can print PDF reports directly in Xojo. Check out Xojo 2020 Release 1.

Thanks Wayne, it’s a great implementation but right now it’s not an option. I can’t upgrade yet.

I’ve achieve done this by first asking the user to choose the margins to 0 and saving the PrinterSetup string. It’s not an optimal but working solution.