Setting the KPrinter configurations

Michael Goffioul kde-print@mail.kde.org
Mon, 03 Feb 2003 10:09:07 +0100


Nicholas Grabowski wrote:
> 
> kde-print
> 
> I am trying to print to the KPrinter using the khtml library.  I've been
> able to create a KHTMLView object and call its print method.  WHich
> intern brings up the printer "setup" dialog.  However, What I would
> really like to do is automagically configure the printer (set it to
> print to a file (pdf), give it the file name) without using a printer
> dialog.  I've noticed there is an autoConfigure() method on KPrinter,
> however, I'm not sure how to tell it to print to the PDF filter or how
> to pass it the file name.  Any suggestions?

You have to use the printer name. In the case of printing to PDF, use
"Print To File (PDF)" (this doesn't take into account localization,
so this is a bug). When invoking "autoConfigure" with a printer that
requires an output file, a file dialog will automatically pop up to
ask the user for a filename.

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
------------------------------------------------------------------
This e-mail and/or its attachments may contain confidential
information.  It is intended solely for the intended addressee(s). 
Any use of the information contained herein by other persons is
prohibited.  IMEC vzw does not accept any liability for the contents
of this e-mail and/or its attachments.
------------------------------------------------------------------