Hi,
I'm developing a music notation program. At startup program is trying to find the default page size user would perhaps want to use with the musical scores. I've used IIntuition->GetPrefs() to get the field Preferences->PaperSize. Now, when I created a new partition for OS4 update 2 combined with Enhancer v2 and most of the OS preferences were at their defaults, I noticed that even if I set the page size to ISO_A4 with Prefs/PrinterPS and use Printer preferences to set driver to PostScript & the device to lpr.device (setup for my HP printer), the GetPrefs() page size will be NARROW_TRACTOR. In the Printer preferences the page size is not editable when PostScript driver is set.
Shouldn't the Preferences->PaperSize be updated even if the PrinterPS preferences editor is used for changing the size? Or am I looking in the wrong direction searching for the default paper size?
Marko
Where to pick the default printed page size?
Re: Where to pick the default printed page size?
Yes, GetPrefs() is REALLY OLD and is only supported for backward compatibility with OS 1.x. It can't really represent all the preferences that OS 2.0 and higher can save.
The way to read preferences since 2.0 is not as simple, unfortunately, and is described in the link below:
https://wiki.amigaos.net/wiki/Preferences
The way to read preferences since 2.0 is not as simple, unfortunately, and is described in the link below:
https://wiki.amigaos.net/wiki/Preferences
- thomasrapp
- Posts: 310
- Joined: Sat Jun 18, 2011 11:22 pm
Re: Where to pick the default printed page size?
Reading prefs should not be necessary. You can query all the required settings directly from printer.device.
Re: Where to pick the default printed page size?
@Steady, @thomasrapp
Thanks! My program actually uses both the prefs files and printer.device preferences to get other settings, but I didn't understand that even this piece of information is not valid anymore. I'll check these.
Marko
Thanks! My program actually uses both the prefs files and printer.device preferences to get other settings, but I didn't understand that even this piece of information is not valid anymore. I'll check these.
Marko
Marko
Re: Where to pick the default printed page size?
@thomasrapp
Hi,
I'm back with the question above. I finally had time to test the printer.device approach to get the default paper size. I found only the struct PrinterData copy of Preferences that contain (a copy of) struct Preferences. Unfortunately changing paper size at PrinterPS prefs editor doesn't seem to change this paper size. I didn't find a way to query paper sizes in printer.device autodoc. How should one do that ?
Marko
Hi,
I'm back with the question above. I finally had time to test the printer.device approach to get the default paper size. I found only the struct PrinterData copy of Preferences that contain (a copy of) struct Preferences. Unfortunately changing paper size at PrinterPS prefs editor doesn't seem to change this paper size. I didn't find a way to query paper sizes in printer.device autodoc. How should one do that ?
Marko
Marko