discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GSCUPS and GNUstep Printing


From: Chad Hardin
Subject: Re: GSCUPS and GNUstep Printing
Date: Fri, 11 Jun 2004 10:11:57 -1000

Using CUPS also expands the number of options available for a printing dialog box.


On Jun 11, 2004, at 2:47 AM, Pete French wrote:

So maybe this is more of an #ifdef #elif type thing.... Comments? How
do people feel about making CUPS the sole supported printing system on
UNIX machines?  If people really object to that, then there could be
three setups:  UNIX like it is now, UNIX with CUPS, and Windows.

I dont thing that using CUPS as the solue UNIX interface is necessarily
a good idea - the system should be portbale and thus need to talk
to 'lp' and 'lpr' based systems as well. On the other hand I think
it would be excellent to have CUPS as the *preferred* way to talk
to printers, for all the reasons you outline below. To be able
to just install it and have all the existsing printers come up in
the print panel, PPD's and all, would be superb.

I think so too!


BTW, here is the general idea of how to use GSCUPS, it is really easy!

NSArray* destinations;
GSCUPSDestination *dest;
NSString *name;
GSCUPSPPDFile *ppdFile;
NSArray *pageSizes;
NSString *jclEnterPSCommand;
int languageLevel;
NSArray *uiGroups;  //Will contain GSCUPSPPDGroup's

destinations = [GSCUPS destinations];

//find the destnation you want
dest = [destinations objectAtIndex: whatever];
name = [dest name];
ppdFile = [dest ppdFile];

pageSizes = [ ppdFile pageSizes];
jclEnterPSCommand = [ppdfile jclEnterPScommand];
languageLevel = [ppdFile languageLevel];
uiGroups = [ppdFile uiGroups];  //returns an array of GSCUPSGroup's
///and on and on....







By writing GSCUPS I've become pretty up to speed with CUPS, so I could
probably add CUPS support for GNUSTEP using libcups directly, no need
for an objective-c wrapper (If that would bother you all)

This might be the simplest solution for now - including GSCUPS inside
GNUstep as it stands then gives programmers two different ways to talks
to ornters, which isnt a good thing for portability. Having CUPS invisible under-the-bonnet but driven by the normal OpenStep printing API would be by far the best way to go I think... especially if you think it's fairly easy
to do so.

Personally, I would prefer to add the objective-c wrappers I have already written and put those directly in GNUstep. Whatever is *not* transferred over would remain behind in the GSCUPS framework.

If I did this, the classes to be added to GNUstep would be:
GSCUPS.h/m
GSCUPSDestination.h/m #This is an abstraction of either one printer or a pool of printers...along with the options associated with instances of those.

#Now the PPD stuff...
GSCUPSPPDAttribute.h/m
GSCUPSPPDChoice.h/m
GSCUPSPPDConstraint.h/m
GSCUPSPPDEmulator.h/m
GSCUPSPPDFile.h/m
GSCUPSPPDGroup.h/m
GSCUPSPPDOption.h/m
GSCUPSPPDProfile.h/m
GSCUPSPPDSize.h/m   #It's nothing like a NSSize... :-)

Not to bad for all the benefits that would be gotten. I think that eventually a new dialog box would have to be created to take full advantage of CUPS capabilities though.



As for handling both type of printing systems, how to handle that? Is the best was to simply read the users defaults and then use a different combination of NSPrinter/NSPrintInfo/NSPrintPanel. It looks like NSPrintOperation should be same either way, on UNIX at least.


Chad



-bat.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]