Command line control of: "kprinter".

James Richard Tyrer tyrerj at acm.org
Tue Mar 23 09:02:03 CET 2004


Goffioul Michael wrote:
>>If you execute:
>>
>>	kprinter --help
>>
>>it says that you can choose the printer and the "mode":
>>
>>Options:
>>   -c                        Make an internal copy of the 
>>files to print
>>   -P, -d <printer>          Printer/destination to print on
>>   -J, -t <title>            Title/Name for the print job
>>   -#, -n <number>           Number of copies
>>   -o <option=value>         Printer option
>>   -j <mode>                 Job output mode (gui, console, 
>>none) [gui]
>>
>>The "-j none" option doesn't work, the dialog still pops up.
> 
> 
> This is not what you think. The "-j" flag redirect messages
> from kprinter to GUI/console/nothing, it does not control the
> dialog appearance. It's a little bit deprecated now. If you
> want to avoid the print dialog, use the "--nodialg" option
> instead.
> 
> 
>>I was trying to use it to print to a PDF but I don't really 
>>know what the 
>>proper name for the <printer> is.  I tried PDF and 2.
> 
> 
> The printer name is the name that appears in the print dialog.
> If you want to print to PDF, then it's "Print to File (PDF)",
> there's no easy shortcut.

Thank you for your assistance.

OK, so I tried this in HEAD:

	kprinter --nodialg -P "Print to File (PDF)" test.ps

This results in a dialog popping up to ask me for the name of the output 
file.  This isn't going to work.  I need to be able to specify the output 
file name on the command line or to tell it to use the input file base name 
and change the extension to 'pdf'.

--
JRT


More information about the kde-print mailing list