Closed
Bug 30211
Opened 25 years ago
Closed 24 years ago
RFE: Add support for libXp/Xprt (X print server printing...)
Categories
(Core :: Printing: Output, defect, P3)
Core
Printing: Output
Tracking
()
VERIFIED
FIXED
People
(Reporter: roland.mainz, Assigned: dcone)
Details
Attachments
(1 file)
12.11 KB,
text/plain
|
Details |
RFE: Add support for Xprt priniting. Xprt is the X print server, e.g. a X server
which uses printers or fax devices as output instead of the gfx card.
AFAIK very simple to implement as we can use the "standard" X rending code.
The Motif toolkit has a reference to it, but I don't know yet if there's an
implementation. If there is one, it should be seperated from Motif...
Comment 1•25 years ago
|
||
tajima-san , I remember sun mention something related to this, can you help to
provide more info. Thanks
No longer blocks: 10001
Reporter | ||
Comment 2•25 years ago
|
||
Fixed summary. In fact, it's libXp, not Xprt we should use for printing.
Possible 1st implemenation:
-- snip --
Display *pdpy;
XPPrinterList plist;
int plistCnt;
XPContext pcontext;
Screen *pscreen;
Window pwin;
d( "start." );
/*
* connect to the X print server
*/
pdpy = XOpenDisplay( printServerName );
/*
* see if the printer "mylaser" is available
*/
plist = XpGetPrinterList (pdpy, "hplaserjet001", &plistCnt );
/*
* Initialize a print context representing "mylaser"
*/
pcontext = XpCreateContext( pdpy, plist[0].name );
XpFreePrinterList( plist );
/*
* Possibly modify attributes in the print context
*/
attrPool = XpGetAttributes( pdpy, pcontext, poolType );
/* twiddle attributes */
XpSetAttributes( pdpy, pcontext, poolType, attrPool, XPAttrMerge );
d( "starting job." );
XpSetContext( pdpy, pcontext );
XpStartJob( pdpy, XPSpool );
/*
* Generate the first page
*/
Open an empty mozilla window without toolbars and borders.
d( "start page." );
XpStartPage( pdpy, pwin, True );
/* Wait for map. This may be unneccesary... */
{
XEvent xev;
do
{
d( "event" );
XNextEvent(pdpy, &xev);
} while (xev.type != MapNotify || xev.xmap.event != pwin );
d( "mapped" );
}
/* render anything into the window */
XpEndPage( pdpy );
d( "end page." );
XpStartPage( pdpy );
/* render 2nd page (e.g. trigger a "pagedown") */
XpEndPage( pdpy );
/*
* End the print job - the final results are sent by the X print
* server to the spooler sub system.
*/
XpEndJob( pdpy );
d( "end job." );
XpDestroyContext( pdpy, pcontext );
/* NOTE: Without this XCloseDisplay the print job will not be fired to the
lp spooler !! */
XCloseDisplay( pdpy );
d( "done." );
-- snip --
Any comments ?
Summary: RFE: Add support for Xprt (X print server printing...) → RFE: Add support for libXp/Xprt (X print server printing...)
Reporter | ||
Comment 3•25 years ago
|
||
Reporter | ||
Comment 4•25 years ago
|
||
Created attachment containing a mail from Thomas J. Gilg <thomas_gilg@hp.com>
which explains some (helpfull/usefull) Xprt details...
Assignee | ||
Comment 5•25 years ago
|
||
Pavlov, waqar can you comment on this. I am not sure what this means, when we
could implement this.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → LATER
Reporter | ||
Comment 6•25 years ago
|
||
What are your problems ?
The X perint server is just another kind of display. My idea was to open a
window without scrollers and toolbars and print it. If a HTML file has more than
one page, the first page is printed, a pagedown is triggered that the next page
will be drawn and printed.
Example:
<xdisplay action="open" display="xprthost:4">
<job action="startjob">
<page action="start">
<rendersomethinginwindow />
</page>
<page action="start">
<rendersomethinginwindow />
</page>
....
</job>
</xdisplay>
It seems that libXp printing will be very simple. We only need to write some
native code and XUL to get a window without borders and print it.
2nd job would be to write a code which lets you select the printer...
Any questions ?
Reporter | ||
Comment 7•25 years ago
|
||
Why "RESOLVED LATER" ?
This way seems a very simple path to implement printing with minimum efforts...
Comment 8•25 years ago
|
||
Sun's team has just started the work, and may provide
a sample implementation of Xprt client adpapter of
Mozilla's gfx layer, but don't know yet when it will
be ready. Roland, if you have some work already
and it is ready to plug in Mozilla, Sun'd better be
withdrawn. Will you please tell us your current
status?
Reporter | ||
Comment 9•25 years ago
|
||
My current status:
I hacked XMX (XMX == Xnest with windows on multiple displays) and directed one
window on my Xsun display, the 2nd on the Xprt server, the I triggered a
StartJob/StartPage etc. sequence for the 2nd XMX window. Except for the coredump
of XMX (as I said - I hacked this into XMX...) I got a "screen" dump including
the Mozilla window.
There's still the problem that I'm not very familar with GTK and can't show up a
simple way how to handle _TWO_ displays within one GTK application ;-(
Reporter | ||
Comment 10•25 years ago
|
||
Any changes here ? Did anyone found a way to hack a GTK application which uses
two different X servers at the same time ?
Reporter | ||
Comment 11•25 years ago
|
||
OK, I'd like to get rid of the RESOLVED/LATER status.
Can someone point me to the URL which describes how to use Mozilla as a widget ?
I'd like to write a small "demostrator" which shows how to print with Mozilla
and libXp...
Reporter | ||
Comment 12•24 years ago
|
||
IMHO this bug can be marked as "RESOLVED FIXED" - Xprint in Mozilla works like a
charm on all platforms (try ../configure --with-xprint)... :-)
Assignee | ||
Comment 13•24 years ago
|
||
Opening to resolve.. per Roland
Status: RESOLVED → REOPENED
Resolution: LATER → ---
Assignee | ||
Comment 14•24 years ago
|
||
Fixed per Roland
Status: REOPENED → RESOLVED
Closed: 25 years ago → 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 15•24 years ago
|
||
SPAM: Changing component from "Printing" to "Printing: Xprint" (still not sure
if this is right... this bug exist long before Xprint was introduced in
Mozilla... ... anyway ... rubberstamping "Printing: Xprint").
You need to log in
before you can comment on or make changes to this bug.
Description
•