discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Printing Postscript Data


From: Alexander Malmberg
Subject: Re: Printing Postscript Data
Date: Mon, 09 Aug 2004 18:40:24 +0200

address@hidden wrote:
> Hi,
> 
> i wonder if it is possible to send postscript data directly to a printer
> instead having a view creating this data. Is this possible with the
> GNUstep printing architecture? I recently started to work on ViewPDF again
> to create the 1.0 version. One thing to implement is printing. PDFKit can
> build postscript data for a number of pages of a document but i don't know
> how to sent this data to a printer. I don't want the PDF view to do
> postscript
> creation because the PDF content is displayed as bitmap image which
> produces huge amounts of data when converting to postscript.

I think DPSPrintf and [GSCurrentContext() isDrawingToScreen] is what you
want. In -drawRect:, you'd do something like

if ([GSCurrentContext() isDrawingToScreen])
{
  /* Current code here. */
}
else
{
   DPSPrintf(GSCurrentContext(), "%s", thePostscriptFromPDFKit);
}

This will give you NSView's pagination support. If you want to handle
pagination on your own, you can probably do that by overriding all the
pagination related methods in NSView, but I haven't looked closely at
it.

- Alexander Malmberg




reply via email to

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