[Xprint] IDEA: A tool which prints an application window

Roland Mainz roland.mainz at nrubsig.org
Thu Oct 7 14:53:02 PDT 2004


Sebastien wrote:
> I spend some time with reading the XPrint documentation today - and
> after some time I was thinking myself 'hey, wouldn't it be cool if I
> can make snapshots from any application using XPrint? Its a Xserver
> after all, kind of, so any X application runs on it, right?'. Is that
> feasible - a tool which redirects an application window to the print
> server and prints that?

I thought a little bit about the issue. The primary problems are:
1. How to display the application on the Xprint server that it appears
within the paper surface (in Xprint the X11 windows usually represent
surfaces on paper) ?
2. How can it be detected that the application finished content loading
(for example a browser), layout, rendering etc. ?
3. How should pagination be implemented ?
4. How should the launched application be terminated ? There is no
window manager running on Xprt so another way is needed to send a
"window close" message to the application.

[1] can be realised quite easy using the APPGROUP extension which allows
an application to specify a window as display area. Then a special
MIT-MAGIC-COOKIE-1 gets generated using the SECURITY extension - all
applications which use this cookie will automagically apper within the
appgroup display area.
[2] is much harder to realise
[3] could be done using XawPrintShell, however the limitation is than
the total height of pages cannot exceed 2^15-1 pixels due a limitation
in the XawPrintShell code.
[4] I remember that somewhere was some example code whoch showed how to
send a "window close" message to an application using it's window id.
Alternatively |XKillClient()| could be used, however I don't like that
idea...

Finally:
We need a name for the tool. Suggested names:
- "xpappsnapshot"
- "xpsnapshot"
- "xpappwindump"
Better suggestions welcome...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)



More information about the xorg mailing list