How can I query the printer properties

d.obermann at d.obermann at
Wed Apr 13 01:20:45 PDT 2005

how can I query the properties of the default printer.
What I want is to find out the default page size of the
default printer.
Is this a setting in the printer or in the operating system?
Or both?

With cupsGetDefault I get the printer
which is a raw stream socket.
In printers.conf is something like:
<DefaultPrinter printer>
DeviceURI socket://
cupsGetPPD("printer") does not give any result.
Maybe the PPD is not the correct way anyway, because it does not give the current default settings of the printer, but all capabilities of the printer.

How do I find out the current default page size (media size) and other printer settings?

I tried out some ipp calls to find out more, but with same result.
Can you provide me with som sample code?


More information about the cups mailing list