Hi, I’m just testing my application in 2017r1 and I’m having problems with the PrinterSetup.SetupString. I used to save the settings for the printer (orientation and margin) in a file and load the settings in. This appears to have stopped working.
Here’s a bit of test code:
Dim setup as printerSetup
setup = new PrinterSetup
'' Show the print dialog box and alter the default settings
Call setup.PageSetupDialog
' Save the settings into a string
Dim s As String = setup.SetupString
' Reset the settings to the new value. I'm not expecting anything to change here.
setup.SetupString = s
' Show the Printer dialog box. This should show my altered settings but instead shows the default settings
Call setup.PageSetupDialog
If I alter the orientation and margins when the first diaolog box pops up, I’m expecting these altered settings to appear when the second dialog box appears. But all that happens is the settings are back at the default. That’s also what happens when I load saved settings in and I try to print.
Haven’t you read the release notes? Yes… Printing on Windows is completely new/rewritten in 2017r1.
So it’s very well possible that some things are not yet working the way they did before.
For me it is: <https://xojo.com/issue/47483>
I also mentioned the SetupString’s there (as a side-note), but I can’t say if that’s what caused the issue I posted.
So please report your Windows-Printing - findings in Feedback, so that it gets looked at by Xojo.
Yes I have read the release notes which state that Windows printing has been “improved”. This is not working.
Perhaps my question wasn’t clear. What I meant was, has the way that I’m supposed to use the SetupString changed? If the answer is “no, it hasn’t changed” then I need to raise a Feedback case.
There was a thread a while back that I think said you have to use a new copy of setup string if it’s an existing installation using an earlier version of Xojo. In other words, for R1 and higher it’s a different string and old ones don’t work any more. Don’t have the original thread, sorry.
If I remember correctly the old one may be ANSI format and new one Unicode format.
In that case you can detect type by looking on the right bytes for the size field.