discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Printing Postscript Data


From: Chad Hardin
Subject: Re: Printing Postscript Data
Date: Fri, 6 Aug 2004 13:09:04 -1000

Actually, I rethought this. This would be fine if all you wanted to do is send the .ps file to the printer. But you should honor the NSPrintInfo stuff as well. The user may want to configure the print job in all sorts of ways:
print out a range of pages,
print out n-page per page
print duplex
scaling, etc etc.

Call you take these NSPrintInfo variables and translate them for xpdf so that it will give you the .ps code that will result in the printout the user expects? How will you prevent NSPrintPanel from going through with it's NSPrintOperation? You could use categories to change behaviors of these NSPrint* stuff, but you're taking a chance that it may not work later on down the road.

On another note,
Have you considered not using xpdf and writing PDFKit in straight AppKit? That way, rather than relying on xpdf making those images, your NSView can draw the stuff just like "normal".

Since xpdf is GPL, you could structure the framework of this hypothetical pure GNUstep PDFKIt based on how xpdf is.

Chad


On Aug 6, 2004, at 10:21 AM, Stefan Kleine Stegemann wrote:


Hi,

Ok, I suppose you could go that route. But everything is based on the printing backend setup now, so that has to be taken into consideration. Both printer backends handle their jobs with PS, but future ones (win32) will likely not. Something to think about down the road.

I thought about this problem but I don't see any other solution for this
problem. This tightly couples ViewPDF to the GNUstep internals which is
not good.

As far as your situation...it sure would be handy if there was a addition to NSPrinter... That would solve this problem quickly and easily. Of course it would be GNUstep specific but what the heck.
Maybe something like this:
@interface NSPrinter (DirectSpooling)
+(BOOL)        canPrinterNamed: (NSString*) printerName
       directlyPrintFileOfType: (NSString*) type;
+(BOOL) directlyPrintFileAtPath: (NSString*) filePath
                 ofType: (NSString*) type
         toPrinterNamed: (NsString*) printerName;
-(BOOL) directlyPrintFileAtPath: (NsString*) filePath
                   ofType: (NSString*) type
+(BOOL) canDirectlyPrintFileOfType: (NSString*) type;
@end
Or something similar
Wouldn't that be nicer?

This would be great. I think it's not a big problem that these methods
are GNUstep specific. If one want's to be portable, simply don't use them :-)
Would it be possible to add these methods?

greets and thanks very much
Stefan




_______________________________________________
Discuss-gnustep mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/discuss-gnustep





reply via email to

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