[texworks] Current status of Tw development

Reinhard Kotucha reinhard.kotucha at web.de
Wed Nov 17 23:55:51 CET 2010


On 17 November 2010 Stefan Löffler wrote:

 > Well, printing should work on Linux by use of the command line tool lpr.
 > This may be available on all typical installations, but I don't know for
 > sure. Besides, its quite old (there are other, more modern systems like
 > CUPS, but again you need to have it installed, you need a proper
 > interface, ...) and options (like which pages to print, ...) are device
 > specific. So it works, but hasn't been tested thoroughly. The same
 > system would be used on Mac, but if it's typically available there at
 > all I have no idea.

lpr is the BSD print system and lp is the System V variant.  Linux
provides lpr and you can rely on it.  CUPS is a wrapper.  I think that
you can assume that it's available on all Linux systems.  CUPS is also
more advanced.  It reads .ppd files.  These files contain commands to
be sent to the printer in order to activate certain features.  It's
also possible to determine which features are available and there are
strings which can be used in dialog boxes.  Hence I think that CUPS
hides all the device dependencies.

Please compare the print dialogs of Firefox and Inkscape.  They look
very similar and I'm pretty sure that CUPS does most of the work
itself.  So I fear that using lp/lpr as a fallback is not worth the
effort at all.  Can't you steel code from Inkscape?

 > On Windows, the postscript code is sent to the printer directly if
 > that is supported.

The print system on Windows versions up to XP is crappy and should
better be avoided.  The problem is the internal graphics format WMF,
which is quite limited.  A assume that Vista supports EMF now, where
some of the limitations are resolved.

Suppose that you have a PDF file which contains CMYK colors.  Adobe
Reader on XP creates WMF and, if you have a PostScript printer,
PSCRIPT5.DLL converts WMF to PostScript.  If you print to a file, you
can see that all CMYK colors were converted to RGB (look for "sco")
because WMF doesn't support CMYK and your printer converts them back
to CMYK, which is just an approximation.  There are other issues too.

If you know that the printer supports PostScript, it's best to copy
the file directly to the printer.  However, you still don't know
which device specific features are available and there is no way to
make use of them.

I don't have Windows and can't check myself.  But it would be nice to
know what other programs, like Inkscape, do on Windows.  Can't imagine
that they wrote everything from scratch.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------



More information about the texworks mailing list