Re: Getting the list of all known paper names
Re: Getting the list of all known paper names
- Subject: Re: Getting the list of all known paper names
- From: Michel Schinz <email@hidden>
- Date: Fri, 18 Nov 2005 16:10:09 +0100
Le 18 nov. 05 à 15:37, John C. Randolph a écrit :
I'm trying to get the list of all defined paper names, and I don't
find an API for that. Basically, I'd like to obtain the list of
paper names which is displayed in a standard "Page Setup..."
dialogue, under the "Paper Size:" heading.
Is there a way to obtain that information?
That information is printer-specific, so it's in the PPD files.
Really? I'm surprised to hear that, as on my development computer I
have no printer defined, and still the list of paper sizes is
available in the "Print Setup..." dialogue. Moreover, I was able to
define a custom paper size, which is stored in ~/Library/Preferences/
com.apple.print.custompapers.plist, also without configuring a single
printer... (And I insist that I *never* defined a single printer on
that computer: [NSPrinter printerNames] returns an empty array).
Being able to use standard paper sizes without having a printer
connected is very useful, and I use it all the time since in many
applications it's the only way to define the physical size of the
document. It's also used as the paper size when saving to a PDF.
So while I'm ready to believe that there is a way to access paper
sizes when a printer is connected, I'd like to know a technique which
also works in the absence of a printer.
(To be clear: the paper sizes I'm interested in should anyway not
depend on the printer, as they're standard [A4, A3, US Letter, etc.].
So I don't want to know what's actually in the trays of a given
printer, but rather what paper sizes are known by the system,
including their localised name.)
Michel.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden