Re: Problems getting description of printer features
Re: Problems getting description of printer features
- Subject: Re: Problems getting description of printer features
- From: Bill Monk <email@hidden>
- Date: Tue, 23 Aug 2005 15:57:53 -0600
I noticed your query hadn't gotten any replies...
Programmatic control over print settings and page setup is possible
using the Carbon Print Manager, as is suppressing the dialogs if you
don't need them. But as far as I know, Cocoa alone still does not
provide this.
However, together they can do it. Here's a link to a Cocoa app I
wrote a while back which should be useful. It demonstrates
programmatically choosing specific printers, choosing papers by name
or by size, choosing Page Setup and Print options without using
dialogs, and how to print a test page without displaying a progress
dialog.
http://homepage.mac.com/tamarat/billmonk/cocoaexamples/
The code is heavily commented, since the UI only shows a small subset
of what is possible.
True, it's not pure Cocoa, but then Cocoa printing is currently
nothing but a wrapper around the Carbon printing API, so it's no
matter. At any rate this approach works well, and for now seems to be
the Apple-approved method of gaining detailed control over printing.
Regards
Bill Monk
On Aug 17, 2005, at 9:20 AM, André Schaupp wrote:
From: "André Schaupp" <email@hidden>
Subject: Problems getting description of printer features
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1
My cocoa-application has to print different types of pdf-files,
each type
needing a special printer configuration. Unfortunally I have to set
primary and
secondary paper feed, which seems to be impossible without using a
printer
dialog.
But since the needed configuration should be selected automatically
through the
type of the pdf, this is no option. The only freedom I will grant
the user is
to choose a printer and the paper trays for the first and other
pages, right
after installing the application.
I would write this down to the users custom printer preferences,
using a
special configuration for every process.
I believed the NSPrinter-object would tell me, wich options the
printer allows
for the paper feed. But since it does not provide this information,
I'll have
to find another way to get this information.
Anybody knows how?
André Schaupp
_______________________________________________
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