Setting left/right margins to 0

I am trying to add “MarginLeft=0” and “MarginRight=0” to the setupstring. I have
settings=ps.SetupString and can dump the values in settings but the margins are not setup by default so I want to force it.

I’ve searched for a while but cannot find a way to add those two entries.

anyone?

As far as I know, we’re not supposed to be messing around with the SetupString. On macOS a bad SetupString will cause a hard crash that you can’t catch. It looks like you’re targeting Windows with the key=value string, but it’s good to be aware of this issue.

I have never needed to override the user’s margin selection, so I’m not sure how you’d go about it with Xojo. @Christian_Schmitz has advanced printing solutions in MBS, he might have something to add here.

Mac? Win? Linux?

Oops …Win

Check our WindowsDeviceModeMBS class. It can take a setup string and allows editing of values.
When you convert back, you can specify the margins.