From owner-freebsd-hackers Tue May 13 11:55:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA06487 for hackers-outgoing; Tue, 13 May 1997 11:55:11 -0700 (PDT) Received: from bmccane.uit.net (bmccane.uit.net [208.129.189.48]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA06478 for ; Tue, 13 May 1997 11:54:59 -0700 (PDT) Received: (from root@localhost) by bmccane.uit.net (8.8.5/8.8.5) id NAA15457; Tue, 13 May 1997 13:54:03 -0500 (CDT) Date: Tue, 13 May 1997 13:54:02 -0500 (CDT) From: Wm Brian McCane To: Simon Shapiro cc: freebsd-hackers@FreeBSD.ORG Subject: Re: URGENT: Printing an X11 screen. How? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Mon, 12 May 1997, Simon Shapiro wrote: > Once upon a time there used to be an wwd-xwud-xpr and somethingtopbm that > could print an X window or a portion thereof. > > Now all I see is xwd and xwud, whose man page refers to xpr which is > nowhere to be seen. xtopbm from pbmnet only deals with bitmaps. > > I need, urgently to dump to a printer a number of X11 screens. How? > > Simon > > d-xpr and somethingtopbm that > could print an X window or a portion thereof. > > Now all I see is xwd and xwud, whose man page refers to xpr which is > nowhere to be seen. xtopbm from pbmnet only deals with bitmaps. > > I need, urgentl > I use the following script. I tie it to buttons in the title bar, and to my window menus. You must have the window fully exposed or it prints whatever is overlapping it. All you need do, is run the command, wait for the beep, and then click the window to print. The program requires a postscript printer, or ghostscript but of course EVERYONE has one of those right 8). #! /bin/sh PATH=/usr/local/xbin:/usr/local/bin:/usr/X386/bin:/usr/gnu/bin:$PATH xwd $* | xwdtopnm | pnmgamma 1.5 2 2.25 | pnmdepth 255 | pnmtops -rle | lpr -Pcdjps brian +-------------------------------------+----------------------------------------+ He rides a cycle of mighty days, and \ Wm Brian and Lori McCane he represents the last great schizm \ McCane Consulting among the gods. Evil though he obviously \ root@bmccane.uit.net is, he is a mighty figure, this father of \ http://bmccane.uit.net/ my spirit, and I respect him as the sons \ http://bmccane.uit.net/~pictures/ of old did the fathers of their bodies. \ http://bmccane.uit.net/~bmccane/ Roger Zelazny - "Lord of Light" \ http://bmccane.uit.net/~bbs/ +---------------------------------------------+--------------------------------+