I use the 'import' command from the ImageMagick suite of command line
graphics utilities. If you use a command like
import -colorspace GRAY -window root -frame pgm:- | lpr
then this tells import to grab the entire contents of the screen in grayscale
format and then write it to standard output in PGM format. The ImageMagick
man page says that it can produce Postscript directly, but I don't actually
remember why I am using PGM output instead. ImageMagick supports a very
long list of output formats. If you know the X11 window id of the window
you want to print, you can specify that to the '-window' option instead of
'root'. Alternately, you can leave out the '-window' option altogether
and 'import' will display a graphical cursor that you can use to select
the window you want to print.
Hope this helps.
Bill Lavender
On Thu, Dec 05, 2002 at 03:24:59PM -0600, Garrett D. Rinehart wrote:
> What do any of you use to get an x-window printed on a PS printer from Linux? I
> need something non-interactive that I can just call from my Tcl/tk script.
>
> On Solaris, the "xwd | xpr | lpr" worked great. My RedHat Linux 7.3 has xwd, but
> not xpr. For that matter, I've searched and searched and I cannot find any
> reference to xpr under Linux on the CDs or the web. Doesn't it exist? Is there
> something else that would do what I want?
- References:
- Xwindow print from Linux Garrett D. Rinehart
- Navigate by Date:
- Prev:
Re: Xwindow print from Linux john sinclair
- Next:
Re: Xwindow print from Linux Brian McAllister
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
<2002>
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Xwindow print from Linux john sinclair
- Next:
Re: Xwindow print from Linux Brian McAllister
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
<2002>
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|