[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-print
Subject:    Re: how to print a postscript file from own application ?
From:       Holger Schroeder <holger-kde () holgis ! net>
Date:       2003-10-22 13:42:26
[Download RAW message or body]

Hi,

<snip>
> KPrinter::printFiles()
> 
> But there's a tricky part here. KPrinter::preparePrinting() needs
> to be called before, and this method is protected (it is called
> automatically when using a QPainter). So the best current solution
> is to subclass KPrinter and provide acces to the protected method,
> then call it in your app. Something like:
> 
> class MyPrinter : public KPrinter
> {
> public:
>      void doPreparePrinting() { preparePrinting(); }
> }
> 
> And in your code:
> 
> MyPrinter printer;
> if (printer.setup())
> {
>      printer.doPreparePrinting();
>      // create PS file
>      printer.printFiles(myPsFiles);
> }
> 
that works fine for me, thanks a lot.
is there also a way to pipe the postscript i generate (it is one big string at 
the moment...) directly into the printing system, or do i have to write it 
into a file and print that file afterwards ?

please cc me.

thanks, Holger

> Michael.
> 
> -- 
> ------------------------------------------------------------------
> Michael Goffioul		IMEC-DESICS-MIRA
> e-mail: goffioul@imec.be	(Mixed-Signal and RF Applications)
> Tel:    +32/16/28-8510		Kapeldreef, 75
> Fax:    +32/16/28-1515		3001 HEVERLEE, BELGIUM
> ------------------------------------------------------------------
> 
> 
> 
_______________________________________________
kde-print mailing list
kde-print@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-print
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic