My app saves PrinterSetup.SetupString (now Settings) for reuse in printing, and it’s worked for many years.
Since macOS 26, the SetupString is incorrectly read, and the ShowPageSetupDialog dialog appears but is blank; the only visible information is the portrait/landscape orientation.
how do you save it?
You can’t assume anything about the content, so treat it as binary data.
If one byte changes or is modified, the data cut, it won’t work.
This is the contents of settings as seen in the Debugger.
As you can see, its Encoding is Nil, and it holds a mix of text and binary data.
As Christian wrote, you have to save / open as Binary. A set of .Write / .ReadAll is what have to be done.
Share just the save / restore settings if you prefer.
Check the BinaryStream entry in the Documentation…
Use Write / Read instead of saving a defined length / load a defined length data…
Look under Open(file As FolderItem, readwrite As Boolean = False) As BinaryStream
Yes, but it’s very old code (20+ years old) that has always worked. I’m happy to switch to a newer version of my app now, but I still need to reread all the print templates saved with this setupstring!
To be fair, I had lots of issues writing and reading binary print setup strings when I was writing Xojo apps for customers. Once I changed to encoded text, I never had a problem again. Just sayin.
Your experience suggests the your data path was not 8-bit safe; haven’t used that term in a looooong time!
This was a big issue back in the early days of networked printers on networks which might have segments that only transmitted 7 bits (!) – this led to Postscript having both a 7-bit ASCII representation and an 8-bit representation. You can even intermix them in a single file, the advantage being that the ASCII representation of the executable code was a lot more readable to humans for debugging while the binary-encoded image data was much more compact in 8 bits.