[cups.general] print .doc with lp
Helge Blischke
h.blischke at srz.de
Thu May 31 04:24:29 PDT 2007
Paul Ortman wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Nathan Wheeler wrote:
>
>>I'm trying to print a MS .doc just by using `lp -d printer file.doc`,
>>but it doesn't print the document, just some garbled text. I can print
>>just fine from word or openoffice, but not command line. Is there a way
>>to do this? Do I need to change mime.types or mime.convs or any filters?
>>Maybe I could convert the file first, like to PS or an image. Any advice?
>
>
> You hit the nail on the head. You'd be best served by converting the
> .doc to PS and then printing that via lp. There are a number of
> converters our there (all with some limitation), but you might try
> experimenting creating a simple "printdoc" script that uses something
> like Abiword scripting to load the given .doc and then print the file
> file out in PS format.
>
> # abiword -p '| lpr -P myprinter' somedocument.doc
>
> It won't be perfect in all cases, but it might be good enough for you.
>
> There are probably a lot of other options out there that might use some
> other .doc capable program, like OpenOffice, but I'll leave the Googling
> up to you.
>
> I imagine you could even hook something like this command up in a custom
> CUPS filter, but since it will never really print exactly like Word
> formats it, it will be a bit disappointing to those who can't appreciate
> the technical difficulty of printing .doc files without documentation.
>
> - --
> Paul Ortman
>
> PGP Key: 55602C81
> - --
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFGXe17fw8KGlVgLIERAgrRAJ4kqwFeaJsuZa8DHVaUHMjP3iunvgCfWX3+
> Qc4d8NZHh4DY/44TkspgYW0=
> =XDaA
> -----END PGP SIGNATURE-----
>
There is a way to use OpenOffice.org to act in the background
to support a special CUPS filter to do that. As this is a bit tricky
to set up, I hesitated to publish it on the CUPS web site's links.
Contact me off the list if you need it.
Helge
--
Helge Blischke
Softwareentwicklung
H.Blischke at acm.org
More information about the cups
mailing list