[tex-live] automatically print dvi files to a printer on windoze
Reinhard Kotucha
reinhard.kotucha at gmx.de
Fri Jun 12 21:35:15 CEST 2015
On 2015-06-12 at 18:02:23 +0200, hw wrote:
> > But it *is* the viewers problem, not the PDF (when it is done correct)
>
> Ok, I did another test and it does work.
>
> Now how I get them printed automatically?
In order to automate things you have to avoid all these colorful GUI
tools completely. The most powerful command-line tool is Ghostscript.
It's advisable to install the latest release (9.16).
http://www.ghostscript.com/download/gsdnld.html
You can invoke Ghostscript from a batch file (and pdftex too, if
desired). Ghostscript can convert PostScript and PDF to many other
formats. My cheap printer understands PCL6 and this is how I invoke
ghostscript:
gs -q -dBATCH -dNOPAUSE -sPAPERSIZE=a4 -sDEVICE=pxlmono -r1200x1200 \
-sOutputFile=- <ps-or-pdf-file>
First of all, on Windows you have to replace the command name 'gs' by
something else. On Windows the name of the program is either
'gswin32c' or 'gswin64c'.
In order to specify the paper size, you have to consult the
documentation.
http://www.ghostscript.com/doc/9.16/Readme.htm
In order to find out which output devices are supported, run
Ghostscript with the -help option.
You have to specify the resolution of your printer explicitly. This
is important because Ghostscript converts vector graphics to bitmaps.
If you omit this option, a very low resolution is assumed and the
results are ugly.
The option -sOutputFile does what it's name implies. If your printer
appears in the filesystem (for example "\\server\my_label_printer")
then you can can specify this file. In my case output is passed to
standard output which is then redirected to an FTP client (LuaTeX)
which finally passes it to the printer.
Ghostscript is very powerful, hence there is no way to use it
efficiently without consulting its documentation.
Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
------------------------------------------------------------------
More information about the tex-live
mailing list