how to print a postscript file from own application ?
Holger Schroeder
holger-kde at holgis.net
Wed Oct 22 16:42:26 CEST 2003
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 at imec.be (Mixed-Signal and RF Applications)
> Tel: +32/16/28-8510 Kapeldreef, 75
> Fax: +32/16/28-1515 3001 HEVERLEE, BELGIUM
> ------------------------------------------------------------------
>
>
>
More information about the kde-print
mailing list