« Updating PrinterSetup… | Home | MBS Filemaker Plugin,… »

Updating PrinterSetup.SetupString on Windows

Same as for Mac is also possible on Windows:

dim p as new PrinterSetup // setup something call p.PageSetupDialog // now we have nice setupstring dim ss as string = p.SetupString // parse it in device mode dim d as WindowsDeviceModeMBS = WindowsDeviceModeMBS.FromSetupString(ss) // duplex is? MsgBox "Duplex: "+str(d.Duplex) // change printer d.DeviceName = "Deskjet 2540 series#:2" // enable duplex d.Fields = BitwiseOr(d.Fields, d.DM_DUPLEX) d.Duplex = d.DMDUP_HORIZONTAL // now duplex is? MsgBox "Duplex: "+str(d.Duplex) // get back as setup string dim da as string = d.SetupString if da = "" then MsgBox "failed to create setup string" Return end if // assign back p.SetupString = da // take a look call p.PageSetupDialog // and print something dim g as Graphics = OpenPrinter(p) g.DrawString "Page 1", 20, 20 g.NextPage g.DrawString "Page 2", 20, 20
So next plugins may help you if you need to modify printer setup strings on Mac and Windows.
09 09 14 - 14:37
No comments

Remember personal info?

Emoticons / Textile

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.