1. General |
- Q:
What is "Xprint" ?
- Q:
Where can I get Xprint/Xprt from ?
- Q:
What is "Xprt" ?
- Q:
Where can I get help for problems with Xprint ?
- Q:
"Why do some people like Xprint ?" / "What are the advantages of Xprint ?"
- Q:
Why do some people dislike Xprint ?
- Q:
Does Xprint support anti-aliased fonts ?
- Q:
How can I check if Xprint is working and should be used ?
- Q:
How can I view PS(=PostScript) files ?
- Q:
How can I view PCL files ?
- Q:
How does Xprt find fonts ?
- Q:
How can I print TrueType fonts with Xprint ?
- Q:
What does "DDX" mean ?
- Q:
What does "DIX" mean ?
- Q:
What does "PDL" mean ?
- Q:
I have twenty printers installed on my system - but Xprt only shows two
screens. Where are all the other printers ?
- Q:
Which platforms support Xprint ?
- Q:
I have the broken Xfree86 Xprt binary on my system. Do I need a new
version of libXp.so (the client side X11 extension library for Xprint),
too ?
- Q:
Which spelling is correct - "Xprint", "XPrint", "Xprinter" or Xprt" ?
- Q:
Which applications support Xprint ?
- Q:
Is "Xprint" "mozilla"-only (I saw that it's hosted by mozdev.org) ?
- Q:
Under which license is the source code from xprint.mozdev.org distributed under ?
- Q:
Why does Xprint not use PPDs for configuration ?
| |
| Q: |
What is "Xprint" ?
|
| A: |
In short, "Xprint" is an advanced printing system which enables X11
applications to use devices like printers, FAX or create documents in
formats like PostScript, PDF or SVGprint.
In long, "Xprint" is a very flexible, extensible, scaleable, client/server
print system based on ISO 10175 (and some other specs) and the X11
rendering protocol.
Using Xprint an application can search, query and use devices like
printers, FAX machines or create documents in formats like PDF or SVGprint.
In particular, an application can seek a printer, query supported
attributes (like paper size, trays, fonts etc.), configure the printer
device to match it's needs and print on it like on any other X device
reusing parts of the code which is used for the video card Xserver...
|
| Q: |
Where can I get Xprint/Xprt from ?
|
| A: |
Xprint is client-server based, therefore two answers:
The server side is available by default on Solaris (see
Note
below) and HP-UX (Xfree86 ships a "Xprt" binary, but that is broken and the server config files
are missing, too).
For those platforms who do not have a (working) Xprt server the you
can get source, binary tarballs and Linux RPMs from
http://xprint.mozdev.org/,
Debian Linux has a package based on the
same sources (see
http://packages.qa.debian.org/x/xprint-xprintorg.html).
Note
For Solaris >= 2.7 http://xprint.mozdev.org/
provides the "GISWxprintglue"
and "GISWxprint" packages (available from
http://xprint.mozdev.org/download.html)
which provides a single-step
drop-in way to configure and start Xprint at system startup and/or
per-user for all applications and users (the package provides only
startup scripts and some config data and uses the Xprt binary provided
with Solaris (/usr/openwin/bin/Xprt)).
The client-side Xprint support library (libXp.so) is available on all
X11 platforms >=R6.4, including Linux, Solaris, HP-UX, AIX, FreeBSD, NetBSD, etc.
If you do not have it you can build it from the sources available at
http://xprint.mozdev.org/.
|
| Q: |
What is "Xprt" ?
|
| A: |
Xprt is the server-side of Xprint. It's just like any other Xserver - it
uses only an other kind of output device (printer instead of framebuffer)
and implements an extra X11 extension ("XpExtension") to handle the
special features/requirements of a "paged device"(=printer etc.).
|
| Q: |
Where can I get help for problems with Xprint ?
|
| A: |
The current main site for the Xprint development is http://xprint.mozdev.org/
which hosts various resources including a mailinglist
(please subscribe before posting) for end-users, admin and developers.
|
| Q: |
"Why do some people like Xprint ?" / "What are the advantages of Xprint ?"
|
| A: |
Xprint allows an application to query what features (paper size, trays,
orientation, resolutions, plexes, fonts and much more) a printer supports.
For example it is avoidable that a user accidently prints DIN-A4 on a
DIN-A0 poster printer (the print dialog would only offer DIN-A0 as paper
size, e.g. offers only choices which are valid for this printer).
Server-side, localizeable configuration - changes to the server
config apply to all users without the need to change/updating anything
on the user side (the user may still start his/her own Xprt instance
using his/her preferred configuration).
Small footprint - ideal for for mobile devices (client side does not
need to process any fonts - that's the job of the server side).
API not restriced to PostScript (X11R6.5.1 comes with PCL and Raster
implementations - and PDF/G3-FAX/SVG would be possible without problems).
Scaleable - Xprint can use as many Xprt servers as the user/admin wants.
"Xprint is designed for the enterprise", e.g. Xprint was designed to
match the needs of large company networks.
Automatic font handling - font download or the existence of
printer-builtin fonts is automagically handled by Xprt - the application
does not need to know/handle any details (but the application can
optionally get information and control the usage of printer builtin
fonts).
You can print anything what you can render on the framebuffer(=video
card) Xserver.
Existing code can be reused 1:1 for printing - which means reduced
development costs.
Easy support for I18N (internationalization) - you simply render any
fonts in any language with Xprint.
Network-transparent design - Client can use local or remote Xprt servers
like any other Xserver.
Uses the X11 protocol - easy adoption of existing code to implement
printer support. And all the network goodies like firewall proxies,
compressors etc. can be used for Xprint without modifications.
Security: Xprint can use all authentification schemes available in X11
(like Kerberos5, SecureRPC, MIT-MAGIC-COOKIE or host-based
authentification).
Enhachements on the server side (Xprt) to not require the change of
client-side code.
Optimized job output (like the PostScript created by the PostScript DDX)
is usually a lot smaller than the PS code created by other PostScript
engines.
|
| Q: |
Why do some people dislike Xprint ?
|
| A: |
There are a few common misconceptions about Xprint.
Let's take a look some of these "myths", some background - and the facts:
- Myth:
Xprint prints just a XWD dump of the Xserver bitmap
- Myth:
Xprint cannot handle non-'ISO Latin 1' chars
- Myth:
Xprint uses a 1024x768 screen resolution to render the stuff on
the paper - therefore it will never be able to do high-resolution
stuff
- Myth:
Xprint prints only graphics(=bitmap/gfx) fonts
- Myth:
Xprint does not support pages sizes larger than DIN-A4
- Myth:
Xprint does not support rotated text
- Myth:
The X11 rendering model is not good enougth for printers
| Myth: |
“
Xprint prints just a XWD dump of the Xserver bitmap
”
| | Fact: |
Whoever says Xprint simply does an "xwd"-like dump is wrong.
In short, Xprint currently (X11R6.5.1) supports *four* drivers:
X to native Postscript
X to native PCL5
X to native PCL3
X to a raster which is then feed to something like xpr to
create PS or PCL5 wrapped rasters.
In long, the original X Print Service ("XPS") was attempted
during CDE 1.0, and they only got so far as the "raster" driver.
As CDE 2.0 came around, Bob Schiefler and others at the X
Consortium agreed that the X Consortium would work on a X to
native PS Level 2 driver and HP would work on a X to native
PCL5 driver.
It was probably the CDE 1.0 effect that left many people with
the impression that Xprint is all about xwd-like window dumps.
NO! Xprint has native PostScript and PCL5 printing and more
drivers (like PDF and SVGprint DDXs etc.) are in the development.
| | Myth: |
“
Xprint cannot handle non-'ISO Latin 1' chars
”
| | Fact: |
Xprint can print any chars incl. those required for MathML,
Hebrew, Arabic, Japanese etc. etc.
For example - the Xprint module for Mozilla5 is the only print
module which can proprtly print MathML.
| | Myth: |
“
Xprint uses a 1024x768 screen resolution to render the stuff on
the paper - therefore it will never be able to do high-resolution
stuff
”
| | Fact: |
Xprt uses the screen resolution requested by the application or
the printers default resolution.
For example a 300 DPI printer which supports paper sizes up to
DIN-A4 will get a screen with 3300x3300 pixels (screen width and
height are usually equal to support per-page changes in the
orientation (potrait/landscape etc.), the window size would be
2400x3149 for "portrait" orientation) - and larger resolutions
will result in larger screens.
| | Myth: |
“
Xprint prints only graphics(=bitmap/gfx) fonts
”
| | Fact: |
In short, Xprt supports printer-builtin fonts and can
download fonts to the printer if they do not exist on the printer.
In long, this myth seems to have it's root in a feature of
Xprt which can - if Xprt gets misconfigured - disable the use of
printer-builtin fonts and the ability to download fonts.
Xprt's PostScript and PCL DDX have the unique feature to create
font glyphs from bitmap fonts if they are not available as
printer-builtin fonts nor as outline fonts (OpenType, TrueType, PS Type1, etc.).
However this is the fallback - the last option used by Xprt.
Used if everything else fails.
But when someone does not pass any outline fonts (such as OpenType,
TrueType or PS Type1) fonts with the font
path nor configures a printer model-config (which contains a
description of the features&fonts supported by the printer) Xprt
will never have a chance to use them. And if everything else
fails it has no other option than using what has been left - the
bitmap fonts...
| | Myth: |
“
Xprint does not support pages sizes larger than DIN-A4
”
| | Fact: |
There is no such limitation.
The only limit is the 16bit coordinate system of the X11
protocol - which is large enougth that Xprint can support paper
sizes larger than DIN-A0 oversize papers. There is no problem
with creating your own monster-size DIN-A0 posters using
Xprint-based applications.
| | Myth: |
“
Xprint does not support rotated text
”
| | Fact: |
Xprint and all it's drivers support the X11 matrix XLFD
enhancement introduced in X11R6 (and future versions of Xprint will
support the STSF font API which supports
matrix transformations as well).
Fonts can be rotated at any angle. Take a look at the
SOFTWARE DEVELOPMENT section in
this FAQ for examples...
| | Myth: |
“
The X11 rendering model is not good enougth for printers
”
| | Facts: |
The default Xprint rendering model uses the X11 rendering model - which
is "limited"... but only when compared with PostScript.
But the attempt to compare Xprint with PostScript is like comparing apples
and eggs - they have been designed with different goals in mind - PostScript
as plain rendering language for printers and Xprint as integrated all-in-one
solution to allow applications to print without having special knowledge
about the OS, spooler, PDL or
printer.
Around 95% of the applications which have print support do not use any of the
special features provided by rendering models like PostScript.
Xprint does not require that an application uses the X11 rendering model -
they are free to generate their own PostScript code or PostScript
fragments and pass it to the printer via the Xprint API or use the OpenGL rendering
model via the GLX extension available in newer versions of the Xprint server.
Printing from Mozilla, Motif or the Qt toolkit using Xprint results in
a much better quality than using the "native" PostScript
generation code in those applications.
Xprint supports more PDLs than
PostScript - having a PostScript-specific rendering model would be
limiting, and make it difficult to support other
PDLs.
|
|
| Q: |
Does Xprint support anti-aliased fonts ?
|
| A: |
Question back: When do we need anti-aliased fonts ?
Anti-aliasing is a "hack" to work around the limitations caused by the
low resolution of monitors - they usually operate between 72 DPI and
150 DPI.
But Xprint operates on printers where the usual minimum resolution is
300 DPI (today's normal office printers support resolutions ranging from
300 DPI up to 2400 DPI depending on the model; most common is 600 DPI).
Anti-aliasing at those resolutions is not required anymore.
Additionally many printers support their own font anti-aliasing at lower
resolutions which is far better and faster than it could be "done" on the
client side.
|
| Q: |
How can I check if Xprint is working and should be used ?
|
| A: |
Check whether the ${XPSERVERLIST} env var is set or not.
If ${XPSERVERLIST} is set then Xprint is available and should be used.
|
| Q: |
How can I view PS(=PostScript) files ?
|
| A: |
|
| Q: |
How can I view PCL files ?
|
| A: |
XXX - xprint.mozdev.org bug 2261
has been filed for that issue.
|
| Q: |
How does Xprt find fonts ?
|
| A: |
Lookup-rule for Xprt's PostScript DDX to find fonts:
Printer-builtin fonts (defined by the fonts/-dir in the model-config)
PostScript fonts (will be downloaded via generated print job)
GFX-fonts build from X11 scaleable fonts
GFX-fonts build from X11 bitmap fonts
|
| Q: |
How can I print TrueType fonts with Xprint ?
|
| A: |
Linux Xprt build from http://xprint.mozdev.org/'s source supports
TrueType fonts out-of-the-box (starting with the 008 development tree;
xprint.mozdev.org's releases <= 007 do not support TrueType fonts) and
and does not require any special actions.
Sun's Xprt on Solaris (/usr/openwin/bin/Xprt) has TrueType font
support out-of-the-box and does not require any special actions.
You can setup a TTF-aware X font server ("xfs", see
xfs(1x))
with the matching TrueType fonts and add the font server location to Xprt's font path.
Sourceforge has a TrueType to PostScript Type 1 converter project,
see http://ttf2pt1.sourceforge.net/download.html.
You may convert the TTF files into PT1 files that Xprt can download them
to the printer on demand...
|
| Q: |
What does "DDX" mean ?
|
| A: |
"DDX" is a short term for "Device Dependent X" - the device-specific layer
of a Xserver ("DIX"(="Device Independent X") is the counterpart).
|
| Q: |
What does "DIX" mean ?
|
| A: |
"DIX" is a short term for "Device Independent X" - the non-device specific
code of a Xserver ("DDX"(="Device Dependent X") is the counterpart).
|
| Q: |
What does "PDL" mean ?
|
| A: |
"PDL" is a short term for "Page Description Language". Examples for PDLs are
PostScript, PCL, PDF and SVGprint.
|
| Q: |
I have twenty printers installed on my system - but Xprt only shows two
screens. Where are all the other printers ?
|
| A: |
A Xprt screen does not represent a single printer. A Xprt screen
represents a single DDX (currently supported are PostScript, PCL3/5 color,
PCL mono and "raster" output(=1bit deep bitmap).
|
| Q: |
Which platforms support Xprint ?
|
| A: |
All platforms which support X11 >= R6.4 can use Xprint. The client side
(libXp.so) is available on Linux/FreeBSD(=Xfree86), Solaris, HP-UX and AIX
and the Xprt server side is available by default on Solaris and HP-UX
(Xfree86 shipps with a Xprt binary - but that is broken and unuseable).
The client-side extension library (libXp.so) can be compiled on any
platform, the Xprt server needs minor adjustments for the specific
platforms...
If your platform does not have Xprint (client-side and/or server-side)
you can get the sources from http://xprint.mozdev.org/.
|
| Q: |
I have the broken Xfree86 Xprt binary on my system. Do I need a new
version of libXp.so (the client side X11 extension library for Xprint),
too ?
|
| A: |
No, the libXp.so shared library shipped with Xfree86 or build from
Xfree86 sources is not broken, only the server side ("Xprt") is buggy.
There is no need to replace the library.
|
| Q: |
Which spelling is correct - "Xprint", "XPrint", "Xprinter" or Xprt" ?
|
| A: |
"Xprint" is the correct one - "XPrint" is just a typo, "Xprinter" is a
complety different product not related to X11/Xprint and "Xprt" is only
the "X11 print server"(=the server side of Xprint).
|
| Q: |
Which applications support Xprint ?
|
| A: |
There are various applications which support Xprint:
Motif/LessTif toolkits (full framework incl. special widgets like XmPrintShell)
Athena toolkit (full framework incl. special widgets like XawPrintShell, starting with X.org release 6.7.1)
Xedit, Xman, Xmore, etc. (starting with X.org release 6.7.1)
Common Desktop Environment (CDE) 2.x
Mozilla, FireFox, ThunderBird, etc.
Eclipse
KDE/Qt support is planned for Q3/2004
StarOffice 5.x
etc.
|
| Q: |
Is "Xprint" "mozilla"-only (I saw that it's hosted by mozdev.org) ?
|
| A: |
No, Xprint is a general-purpose print API based on X11 used by
many applications - mozdev.org is just
one of the hosting places (others are
http://xprint.freedesktop.org/ (bugzilla, CVS)
and http://www.sourceforge.net/projects/xprint/ (download area))
hosting the development area, documentation and
mailinglist.
:).
|
| Q: |
Under which license is the source code from xprint.mozdev.org distributed under ?
|
| A: |
That's the plain "MIT" license, the same as used by Xfree86.org < V4.4.0 and X.org:
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| Q: |
Why does Xprint not use PPDs for configuration ?
|
| A: |
Xprint supports multiple "page description languages (PDL)"
including PostScript, PDF, PCL, etc. Therefore Xprint uses a different
configuration file format which works with all these PDLs and not only
PostScript (PPD files are PostScript-specific and cannot be used for
other PDLs).
There is currently a converter in development to convert a Adobe PPD file
into Xprint's model-config format.
See xprint.freedesktop.org bug 636
("RFE: Add an Adobe PPD to model-config converter / xpppdtomodelconfig") for further information.
|
2. Usage |
- Q:
How do I configure Xprint on the client side ?
- Q:
How do I start Xprt ?
- Q:
How can I get a list of printers managed by Xprint ?
- Q:
How can I start Xprt at boot time ?
- Q:
How can I start Xprt per-user ?
- Q:
How can I start Xprt only for one application ?
- Q:
How can I filter the font path which should be passed to Xprt for
certain fonts ?
- Q:
How can I manage access control to the Xprt server ?
- Q:
How can I log access to the Xprt server ?
- Q:
Does it require "root" permissions to use Xprt/Xprint ?
- Q:
How can I see the attributes of a printer managed by Xprint ?
- Q:
How can I list the font path used by a Xprt server ?
- Q:
"xset q" lists all model-specific font dirs (like
PRINTER:/myxpcfg/C/print/models/SPSPARC2/fonts/") - is that a bug ?
- Q:
My application lists a printer called "xp_ps_spooldir_tmp_Xprintjobs" /
"xp_pdf_spooldir_tmp_Xprintjobs" / "spooldir_tmp_Xprintjobs" / in the
print dialog but I do not have such a print queue installed anywhere.
What is that for a thing ?!
- Q:
How can I forward Xprint services when logging-in via ssh to another machine ?
| |
| Q: |
How do I configure Xprint on the client side ?
|
| A: |
There are two env vars which control Xprint on the client side:
The env variable ${XPSERVERLIST} contains a list of display identifiers
(seperated by whitespace) to tell the application where it can find
the Xprt servers.
Usually ${XPSERVERLIST} is set by the profile startup scripts (e.g.
/etc/profile or /etc/profile.d/xprint.sh) using the output of
"/etc/init.d/xprint get_xpserverlist".
Example:
% export XPSERVERLIST="`/etc/init.d/xprint get_xpserverlist`"
Alternativly ${XPSERVERLIST} can be set manually:
Example:
% export XPSERVERLIST="littlecat:80 bitdog:72"
instructs an application to look at the displays 80 on the machine
"littlecat" and display 72 on the machine bigdog to look for Xprt
servers.
The env variable ${XPRINTER} defines the default printer used by print
applications.
The details can be found in the FAQ item
How do I change the default printer used by Xprint applications ? ...
|
| Q: |
How do I start Xprt ?
|
| A: |
Linux RPM installations on Mandrake/RedHat/SuSE Linux:
Binary RPM packages provided by xprint.mozdev.org (or based on the same
source :) will install /etc/init.d/xprint and related glue
(see [4])
automatically; after a reboot a Xprt instance will be started at system
startup and ${XPSERVERLIST} should be populated for all users.
Note that you can start/stop per-user instances using /etc/init.d/xprint
(see [4]), too...
Debian Linux:
Same as [1], however Debian does not support
/etc/profile.d/ - you have to add the following line to /etc/profile
(for sh/ksh/bash) to populate ${XPSERVERLIST}:
export XPSERVERLIST="`/bin/sh /etc/init.d/xprint get_xpserverlist`"
See bugs.debian.org bug 171174
('"xprint-xprintorg" should automatically populate $XPSERVERLIST') for
further details on this issue...
Solaris using the "GISWxprintglue" package:
http://xprint.mozdev.org/
provides a Solaris package called "GISWxprintglue"
which contains all the neccesary configuration files and startup scripts
to use Xprint; after a reboot a Xprt instance will be started at system
startup and ${XPSERVERLIST} should be populated for all users.
Note that you can start/stop per-user instances using /etc/init.d/xprint
(see [4]), too...
Solaris using the "GISWxprint" package:
http://xprint.mozdev.org/
provides a Solaris package called "GISWxprint"
which is technically identical to the "GISWxprintglue"
(see [3a]) but
provides a Xprt binary build from the xprint.mozdve.org sources
("GISWxprintglue" uses the /usr/openwin/bin/Xprt binary provided by Solaris).
General: Using /etc/init.d/xprint and related glue:
There are startup/shutdown scripts in xc/programs/Xserver/Xprint/etc/
to start/stop/restart Xprt per-machine and/or per-user and to populate the
${XPSERVERLIST} env var:
"xc/programs/Xserver/Xprint/etc/init.d/xprint" is a script for SystemV
and Linux to start/stop/restart Xprt. The script includes installation
and usage details and can be used by both "root" (to start Xprt for all
users) or by a single (non-priviledged, plain) user (to start Xprt
instances only for his/her own use)
"xc/programs/Xserver/Xprint/etc/profile.d/xprint.csh" and
"xc/programs/Xserver/Xprint/etc/profile.d/xprint.sh" are scripts for
Linux (which support /etc/profile.d/ ; note that this does not include
Debian) to populate the ${XPSERVERLIST} env var for each user.
Starting Xprt "manually" (without using /etc/init.d/xprint):
Set the ${XPCONFIGDIR} env variable to the directory where Xprt can find
it's configuration data.
WARNING
If Xprt cannot find it's configuration data it will not be
able to use printer-builtin fonts (which are defined by the
model-config in the configuration dir). Without printer-builtin fonts
Xprt may fall back to generate font glyphs from bitmap fonts (this
resulted in the MYTH that "Xprt can only print gfx fonts". This is not
TRUE - this only happens if Xprt is either misconfigured or no
matching builtin or PS Type1 font is available).
You may want to make a copy of the default configuration directory and
modify it to match your needs.
Starting Xprt is just as easy as starting any other Xserver:
% Xprt :12
will start Xprt on display 12 (e.g. set ${XPSERVERLIST} to ":12" or
"myhostname:12".
You may want to copy your framebuffer Xserver's font path to be able to
print all fonts which can be displayed on that Xserver.
% Xprt -fp $(xset q | awk "/Font Path:/ { i=1 ; next } i==1 { print \$0 ; i=0 }") :12
Notes:
The /etc/init.d/xprint has a more advanched filtering scheme based on
regex patters to "accept" and/or "reject" font paths
'xset q | awk "/Font Path:/ { i=1 ; next } i==1 { print \$0 ; i=0 }"'
may be too simple-minded if your Xserver does not support TrueType
fonts. The following statemement is better in this case since it
filters the font path and removes all path elements which have TrueType
fonts (*.ttf, *.TTF) or TrueType font collections (*.ttc, *.TTC) in
fonts.dir:
% xset q | awk "/Font Path:/ { i=1 ; next } i==1 { print \$0 ; i=0 }" |
tr "," "\n" | while read i ; do \
if [ "$(cat ${i}/fonts.dir | egrep -i "ttf|ttc" 2>/dev/null)" == "" ] \
; then echo $i ; fi ; done | (fontpath="" ; fpdelim=""; while read i ; \
do fontpath=${fontpath}${fpdelim}${i} ; fpdelim="," ; done ; echo \
$fontpath)
It may be easier to just feed all available font paths to Xprt
(BTW: mozilla 1.0 had a bug in that case which resulted in the problem
that it used many many bitmap fonts in that case - this has been fixed
for 1.0.1 and Netscape 7 (that's the reason why the quickguides for
hebrew/cyrillic use the "Xp_dummyfonts" fonts instead of
/usr/openwin/lib/X11/fonts/misc/ - to avoid that Mozilla finds bitmap
fonts for the same locale).
The following "small" one-liner finds all fonts (except printer builtin
fonts):
% find /usr/openwin -name fonts.dir | while read i ; do echo
${i%/fonts.dir} ; done | fgrep -v "models/"
Plug it into the filter above to remove the Truetype fonts and you are
"done"... :)
See TROUBLESHOOTING if you run into problems...
|
| Q: |
How can I get a list of printers managed by Xprint ?
|
| A: |
The tool "xplsprinters" is designed for that purpose. It can deliver both
list of printers and attributes supported for a specific list of printers.
Use % xplsprinters -h # to obtain usage information.
Example:
Get list of available printers:
% xplsprinters
printer: hplaserjet001@castor:19
printer: hpcolor001@castor:19
printer: laser1@jason:5
printer: david_dj01@jason:5
Get information about the supported attrbites of printer "ps002":
% xplsprinters -printer ps002 -l
printer: ps002@castor:18
description=
model-identifier=HPDJ1600C
default-medium=iso-a4
default-input-tray=
medium-source-sizes-supported=iso-a4 false 6.35 203.65 6.35 290.65
medium-source-sizes-supported=na-letter false 6.35 209.55 6.35 273.05
default-printer-resolution=300
resolution=300
default_orientation=
orientation=portrait
orientation=landscape
default_plex=
plex=simplex
|
| Q: |
How can I start Xprt at boot time ?
|
| A: |
"xc/programs/Xserver/Xprint/etc/init.d/xprint" is a script for SystemV
and Linux to start/stop/restart Xprt at system startup (e.g. per-machine)
or for a single user (e.g. per-user).
The script includes installation and usage details.
|
| Q: |
How can I start Xprt per-user ?
|
| A: |
"xc/programs/Xserver/Xprint/etc/init.d/xprint" is a script for SystemV
and Linux to start/stop/restart Xprt at system startup (e.g. per-machine)
or for a single user (e.g. per-user).
The script includes installation and usage details.
|
| Q: |
How can I start Xprt only for one application ?
|
| A: |
Create your own version/copy of /etc/init.d/xprint and modify it to fit
your requirements and then make sure that you issue a
"my_xprint_startscript start" before starting the application and a
"my_xprint_startscript stop" after leaving the application.
|
| Q: |
How can I filter the font path which should be passed to Xprt for
certain fonts ?
|
| A: |
XXX
|
| Q: |
How can I manage access control to the Xprt server ?
|
| A: |
Access control to Xprt is not differently as to any other Xserver and
can be handled in various ways - like per-cookie
(using MIT-MAGIC-COOKIE-1 authentification),
per-user (using SUN-DES-1 or MIT-KERBEROS-5 auth., see
(see xhost(1x)))
and/or per-machine (using "xhost" (see xhost(1x)) and/or
/etc/X<dpy>.hosts (<dpy> == display number,
e.g. /etc/X0.hosts for display 0) (see Xserver(1x)))
Consult manual pages
Xsecurity(7),
xhost(1x),
Xserver(1x)
etc. for further details.
|
| Q: |
How can I log access to the Xprt server ?
|
| A: |
Logging access to Xprt can be done using the standard Xserver auditing,
see the Xserver(1x)
manual page, option "-audit"
|
| Q: |
Does it require "root" permissions to use Xprt/Xprint ?
|
| A: |
No, both Xprint clients and Xprint server(s) do not require root rights
to work.
Xprint clients are handled like any other X11 application and the Xprt
servers can run without any special requirements.
Solaris is an exception here since it requires to start any Xserver
(incl. Xprt) setgid "root" (set-group-id "root", this is not
set-user-id "root") since the sockets/pipe files in /tmp/.X11-pipe/ and
/tmp/.X11-unix/ are only accessible for the group "root".
The workaround is to start Xprt with the option "-pn"; therefore even
Xprt server binaries which are not setgid "root" can run without
problems).
|
| Q: |
How can I see the attributes of a printer managed by Xprint ?
|
| A: |
"xplsprinters -printer myprinter004 -l" will do the job for printer
"myprinter004".
See
xplsprinters(1x)
for futher usage and a description of the output.
|
| Q: |
How can I list the font path used by a Xprt server ?
|
| A: |
Figure out the display id of the server which should be queried (we are
using "foobar:98" in this example) and then try this:
% (DISPLAY=foobar:98 xset q | \
awk "/Font Path:/ { i=1 ; next } i==1 { print \$0 ; i=0 }" | \
tr "," "[\n]")
# Output may look like:
PRINTER:/usr/openwin/server/etc/XpConfig/C/print/models/HPDJ1600C/fonts/
PRINTER:/usr/openwin/server/etc/XpConfig/C/print/models/SPSPARC2/fonts/
PRINTER:/usr/openwin/server/etc/XpConfig/C/print/models/HPLJ3Si-PS/fonts/
/usr/openwin/lib/X11/fonts/F3/
/usr/openwin/lib/X11/fonts/F3bitmaps/
/usr/openwin/lib/X11/fonts/Type1/
/usr/openwin/lib/X11/fonts/Speedo/
/usr/openwin/lib/X11/fonts/misc/
/usr/openwin/lib/X11/fonts/75dpi/
/usr/openwin/lib/X11/fonts/100dpi/
Note:
Note that the font path items which start with "PRINTER:" are only be
sourced after the matching printer has been selected and configured
(for developers: After XpSetContext has been called).
|
| Q: |
"xset q" lists all model-specific font dirs (like
PRINTER:/myxpcfg/C/print/models/SPSPARC2/fonts/") - is that a bug ?
|
| A: |
No, this is normal. Xprt will add all fonts of all printer models to the
font path - but font path items starting with "PRINTER:" are only
available for an application after the matching printer has been
selected and configured (for developers: After XpSetContext has been
called), before that point fonts in these dirs are not available for
an application.
|
| Q: |
My application lists a printer called "xp_ps_spooldir_tmp_Xprintjobs" /
"xp_pdf_spooldir_tmp_Xprintjobs" / "spooldir_tmp_Xprintjobs" / in the
print dialog but I do not have such a print queue installed anywhere.
What is that for a thing ?!
|
| A: |
"xp_ps_spooldir_tmp_Xprintjobs" and "xp_pdf_spooldir_tmp_Xprintjobs"
("spooldir_tmp_Xprintjobs" was the old, pre-009 name for "xp_ps_spooldir_tmp_Xprintjobs")
are special Xprint printer targets which uses the "PSspooldir" / "PS2PDFspooldir-GS"
printer models. These model config sends PostScript or PDF jobs
to the /tmp/Xprintjobs/ directory instead to a physical printer
(quite usefull for people who want to get the PostScript or PDF files as output instead
of printed pages).
References:
|
| Q: |
How can I forward Xprint services when logging-in via ssh to another machine ?
|
| A: |
You have to forward the X11 connection for the Xprint server(s) to the remote system
and set the XPSERVERLIST variable to direct the Xprint clients to the forwarded ports.
Example 1. Login to a remote host using slogin (assuming there is only one
Xprint server listed in XPSERVERLIST) % echo $XPSERVERLIST west:33 Add 6000 to the display number ("33" in this example) to get the port number
(X11 port numbers start at port 6000. 6000 is display number "0", 6001 is display number 6001 and so on)
and then ask slogin to forward the port:
% slogin -R6033:west:6033 -l nrubsig puzzle
nrubsig's password:
Last login: Fri Jan 23 04:05:06 2004 from west.informatik.med.uni-giessen.de
Have a lot of fun...
Then set the XPSERVERLIST env var on the remote host to the forwarded
ports and you are done:
% export XPSERVERLIST="localhost:33 ${XPSERVERLIST}"
Example 2. Login to a remote host using slogin (assuming there are multiple
Xprint servers listed in XPSERVERLIST)
The following small shell script will process the XPSERVERLIST env var and output the
parameters for calling slogin/ssh with all Xprint server ports forwarded:
#!/bin/ksh
# xp_print_slogin_args.ksh
# Small example which parses $XPSERVERLIST and prints out how slogin/ssh
# should be used to forward all local Xprint servers
PORTARGS=""
REMOTE_XPSERVERLIST=""
spacer="" # seperator
remoteport=6100
remotedisplaynum=100
echo "${XPSERVERLIST}" | tr " " "\n" |
while read i ; do
[ "$i" = "" ] && continue
displaynum="${i##*:}"
port="$(( ${displaynum} + 6000 ))"
hostname="${i%:*}"
PORTARGS="${PORTARGS}${spacer}-R${remoteport}:${hostname}:${port}"
REMOTE_XPSERVERLIST="${REMOTE_XPSERVERLIST}${spacer}localhost:${remotedisplaynum}"
spacer=" "
remoteport=$((${remoteport} + 1))
remotedisplaynum=$((${remotedisplaynum} + 1))
done
echo "Log in with: % slogin ${PORTARGS} -l myloginname myremotehost"
echo "Set remote XPSERVERLIST with % export XPSERVERLIST=\"${REMOTE_XPSERVERLIST} \${XPSERVERLIST}\""
# EOF.
Example usage:
% xp_print_slogin_args.ksh
will print
Log in with: % slogin -R6100:west:6033 -R6101:north:6033 -l myloginname myremotehost
Set remote XPSERVERLIST with % export XPSERVERLIST="localhost:100 localhost:101 ${XPSERVERLIST}"
|
3. Configuration |
- Q:
How do I change the default printer used by Xprint applications ?
- Q:
How do I change the defaults for double-sided/single-sided/etc.
printing ?
- Q:
I am in America and I don't have any ISO A4 paper. How do I change the
default paper size to 8.5 inch x 11 inch (US-Letter) ?
- Q:
How do I change the default printer resolution ?
- Q:
How do I change the default settings for "portrait"/"landscape"/"seascape" (=page orientation) ?
- Q:
How can I prevent Xprt from using any bitmap(=gfx) fonts ?
- Q:
I want only my manually added printers managed by Xprint. How can I
prevent Xprt from looking-up the printer names automatically ?
- Q:
How can I specify an own program/script to enumerate the printers on my system ?
- Q:
Which program is used by default by Xprt to enumerate the printers on my system ?
- Q:
Where can I get more PostScript Type1 fonts from ?
- Q:
What are PMF fonts (e.g. the *.pmf fonts in
${XPCONFIGDIR}/C/print/models/%model_name%/fonts/ (or
${XPCONFIGDIR}/${LANG}/print/models/%model_name%/fonts/)) ?
- Q:
Can I use the fontserver ("xfs") with Xprt ?
- Q:
What is a "model-config" ?
- Q:
Where can I store the default values for printers ?
- Q:
How can I create my own model-config ?
- Q:
How can I create my own PMF "fonts" ?
- Q:
Where can I get more model-configs from ?
- Q:
If I install Xprt &co. as "root" in the default location and don't need
to set ${XPCONFIGDIR} - where are my configuration files located then ?
- Q:
Are config files and/or the PMF fonts architecture dependent ?
- Q:
Can I localise my Xprint/Xprt configuration (l10n) ?
- Q:
Can I execute my own scripts to process the PostScript files generated
by Xprt ?
- Q:
How can I disable "xp_ps_spooldir_tmp_Xprintjobs" / "xp_pdf_spooldir_tmp_Xprintjobs" printer targets ?
| |
| Q: |
How do I change the default printer used by Xprint applications ?
|
| A: |
The env variable ${XPRINTER} defines the default printer used by print
applications. The syntax is either <printername> or
<printername>@<display>
Examples:
% export XPRINTER=ps003
tells an application to look for the first printer named "ps003" on
all Xprt servers.
% export XPRINTER="hplaser19@littlecat:80"
tells an application to look for the printer "hplaser19" on the Xprt
display "littlecat:80".
Note:
If ${XPRINTER} is not set the applications will examine the values of
the ${PDPRINTER}, ${LPDEST}, and
${PRINTER} env vars (in that order).
|
| Q: |
How do I change the defaults for double-sided/single-sided/etc.
printing ?
|
| A: |
This is controlled via the "plex" attribute in the document attribute
pool (${XPCONFIGDIR}/${LANG}/print/attributes/document and/or
${XPCONFIGDIR}/C/print/attributes/document).
Examples:
Adding/modifying the following line to/in
${XPCONFIGDIR}/C/print/attributes/document sets the default plex for
all printers to "duplex":
*plex: duplex
Adding/modifying the following two lines to/in
${XPCONFIGDIR}/C/print/attributes/document sets the default plex for
all printers to "duplex" except for printer "ps003" which should
default to "simplex":
*plex: duplex
ps003.plex: simplex
Notes:
Not all printers support all plex modes. The model-config may restrict
the available plex modes.
Setting a plex mode which is not supported by either the DDX(=driver)
or not specified in the model-config will cause Xprt to not set a
default plex.
The PostScript DDX supports plex modes "simplex", "duplex" and "tumble".
Verification:
Use
xplsprinters -l | egrep "^printer:|default_plex=|plex="
to view the plex settings for all printers.
|
| Q: |
I am in America and I don't have any ISO A4 paper. How do I change the
default paper size to 8.5 inch x 11 inch (US-Letter) ?
|
| A: |
This is controlled via the "default-medium" attribute in the document
attribute pool (${XPCONFIGDIR}/${LANG}/print/attributes/document and/or
${XPCONFIGDIR}/C/print/attributes/document).
Examples:
Adding/modifying the following line to/in
${XPCONFIGDIR}/C/print/attributes/document sets the default paper size
for all printers to "na-letter":
*default-medium: na-letter
Adding/modifying the following two lines to/in
${XPCONFIGDIR}/C/print/attributes/document sets the default paper size
for all printers to "na-letter" except for printer "ps003" which should
default to "iso-a4":
*default-medium: na-letter
ps003.default-medium: iso-a4
Notes:
xprint.mozdev.org releases >= 007 provides a seperate "document"
attribute pool for en_US(-like) locales (see
${XPCONFIGDIR}/en_US/print/attributes/document) which will override the
default ISO-A4 with US-Letter (this feature assumes that ${LANG} is set
to "en_US" (or a locale which has similar defaults as "en_US", those
are currently linked to "en_US" in ${XPCONFIGDIR}/))
Not all printers support all paper sizes. The model-config may restrict
the available paper sizes.
Setting a paper size which is not supported by either the DDX(=driver)
or not specified in the model-config will cause Xprt to not set a
default paper size.
The PostScript DDX supports the following paper sizes:
X.org release 6.6 (X116.6):
"iso-a4", "na-letter", "na-legal", "executive", "iso-designated-long", "na-number-10-envelope"
xprint.mozdev.org release >= 006:
"na-letter", "na-legal", "executive", "folio", "invoice", "ledger", "quarto", "a", "b", "c", "d", "e", "na-6x9-envelope", "na-10x15-envelope", "monarch-envelope", "na-10x13-envelope", "na-9x12-envelope", "na-number-10-envelope", "na-7x9-envelope", "na-9x11-envelope", "na-10x14-envelope", "na-number-9-envelope", "iso-a0", "iso-a1", "iso-a2", "iso-a3", "iso-a4", "iso-a5", "iso-a6", "iso-a7", "iso-a8", "iso-a9", "iso-a10", "iso-b1", "iso-b2", "iso-b3", "iso-b4", "iso-b5", "iso-b6", "iso-b7", "iso-b8", "iso-b9", "iso-b10", "jis-b1", "jis-b2", "jis-b3", "jis-b4", "jis-b5", "jis-b6", "jis-b7", "jis-b8", "jis-b9", "jis-b10", "iso-c3", "iso-c4", "iso-c5", "iso-c6", "iso-designated-long"
Verification:
Use
xplsprinters -l | egrep "^printer:|default-medium=|medium-source-sizes-supported="
to view the medium settings for all printers.
The 'medium-source-sizes-supported='-lines have the format XXX.
|
| Q: |
How do I change the default printer resolution ?
|
| A: |
This is controlled via the "default-printer-resolution" attribute in the
document attribute pool (${XPCONFIGDIR}/${LANG}/print/attributes/document
and/or ${XPCONFIGDIR}/C/print/attributes/document).
Examples:
Adding/modifying the following line to/in
${XPCONFIGDIR}/C/print/attributes/document sets the default
resolution for all printers to 600 DPI:
*default-printer-resolution: 600
Adding/modifying the following two lines to/in
${XPCONFIGDIR}/C/print/attributes/document sets the default resolution
for all printers to 300 DPI except for printer "tekcolor_ps" which
should default to 1200 DPI:
*default-printer-resolution: 300
tekcolor_ps.default-printer-resolution: 1200
Notes:
Not all printers support all resolutions. The model-config may restrict
the available resolutions.
Setting a resolution which is not supported by either the
DDX(=driver) or not specified in the model-config will cause Xprt to
not set a default resolution.
The PostScript DDX supports the following default resolutions
X.org release 6.6 (X116.6):
300, 600, 720, 940, 1200, 1440, 2400
xprint.mozdev.org release >= 006:
75, 100, 120, 150, 180, 200, 240, 300, 360, 400, 600, 720, 940, 1200, 1440, 2400
Verification:
Use
xplsprinters -l | egrep "^printer:|default-printer-resolution=|resolution="
to view the resolution settings for all printers.
|
| Q: |
How do I change the default settings for "portrait"/"landscape"/"seascape" (=page orientation) ?
|
| A: |
This is controlled via the "content-orientation" attribute in the
document attribute pool (${XPCONFIGDIR}/${LANG}/print/attributes/document
and/or ${XPCONFIGDIR}/C/print/attributes/document).
Examples:
Adding/modifying the following line to/in
${XPCONFIGDIR}/C/print/attributes/document sets the default
orientation for all printers to "portrait":
*content-orientation: portrait
Adding/modifying the following two lines to/in
${XPCONFIGDIR}/C/print/attributes/document sets the default orientation
for all printers to "portrait" except for printer "ps003" which should
default to "landscape":
*content-orientation: portrait
ps003.content-orientation: landscape
Notes:
Not all printers support all orientations. The model-config may
restrict the available orientations.
Setting an orientation which is not supported by either the
DDX(=driver) or not specified in the model-config will cause Xprt to
not set a default orientation.
The PostScript DDX supports the following orientations:
"portrait", "landscape", "reverse-portrait" and "reverse-landscape".
Verification:
Use
xplsprinters -l | egrep "^printer:|default_orientation=|orientation="
to view the orientation settings for all printers.
|
| Q: |
How can I prevent Xprt from using any bitmap(=gfx) fonts ?
|
| A: |
Do not pass any bitmap fonts with the "-fp" (=font path) argument.
However you have to provide a 'fixed' and a 'cursor' font, a Xserver
can't start without having these fonts.
Procedure 1. Task list:
Create a new directory:
% mkdir Xp_dummyfonts
% cd Xp_dummyfonts
Create a fonts.alias file with the following content:
! alias for "fixed" font
! original from /usr/openwin/lib/X11/fonts/misc/fonts.alias looks like this:
! fixed "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1"
fixed -*-r-*--*-*-*-*-*-*-iso8859-1
! EOF.
Copy or link "6x13.pcf.Z" and "cursor.pcf.Z" and create fonts.dir
% ln -s /usr/openwin/lib/X11/fonts/misc/6x13.pcf.Z .
% ln -s /usr/openwin/lib/X11/fonts/misc/cursor.pcf.Z .
% mkfontdir $PWD
Verify: The directory should now look like this:
% ls -1
6x13.pcf.Z
cursor.pcf.Z
fonts.alias
fonts.dir
Add the full path (e.g. /home/xp/Xp_dummyfonts) as last element
of the font path when starting Xprt:
% Xprt -fp /usr/openwin/lib/X11/fonts/Type1/,/home/xp/Xp_dummyfonts :12
|
| Q: |
I want only my manually added printers managed by Xprint. How can I
prevent Xprt from looking-up the printer names automatically ?
|
| A: |
Add a line with "Augment_Printer_List %none%" to
${XPCONFIGDIR}/C/print/Xprinters (or
${XPCONFIGDIR}/${LANG}/print/Xprinters) and add lines with
"Printer <name>" for each printer <name>.
Example:
Augment_Printer_List %none%
Printer ps001
Printer ps003
Printer hplaser6
will add only the printers "ps001", ps003" and "hplaser6".
|
| Q: |
How can I specify an own program/script to enumerate the printers on my system ?
|
| A: |
Add "Augment_Printer_List my_script" to ${XPCONFIGDIR}/C/print/Xprinters (or
${XPCONFIGDIR}/${LANG}/print/Xprinters).
The script must return the printer names - one per line, ASCII-only - to stdout.
|
| Q: |
Which program is used by default by Xprt to enumerate the printers on my system ?
|
| A: |
This depends on the OS:
On Solaris (and most other OSes exclusing AIX and Linux):
% lpstat -a | cut -d " " -f 1
On Linux:
For Xprt build from X11R6.x X.org sources:
% lpc status | grep -v '^\t' | sed -e /:/s/// # '\t' means TAB
For Xprt build from xprint.mozdev.org <= release 008 sources (both lines are executed
to support both LPRng and CUPS (using the CUPS *BSD compatibility tools)):
% lpc status | awk '/:$/ && !/@/ { print $1 }' | sed -e /:/s/// ; \
lpc -a status | awk '/@/ && !/:/ { split( $1, name, \"@\" ); print name[1]; }'
Xprt build from xprint.mozdev.org >= release 009 sources uses a more flexible scheme
which tries to enumerate the print spoolers in the order "CUPS" (using the normal CUPS
(SYSV-like) commands), "LPRng" and finally "*BSD", the first working (=print queues are
found) print spooler is chosen.
The spooler(s) being used (and the query order) can be changed by the "-XpSpoolerType"
command line option.
The list of commands used to enumerate the queues for a specific spooler type
can be found in xc/programs/Xserver/Xprint/spooler.c
On AIX v4:
% lsallq | grep -v '^bsh$'
Notes:
See xc/programs/Xserver/Xprint/Init.c (xprint.mozdev.org >= release 009 uses
xc/programs/Xserver/Xprint/spooler.c) for a complete list of commands
used on the specific platforms to enumerate the printers.
Note that the output is always piped through "sort" to get an
alphabetical order (the "default" printer is not chosen/defined
here(=server side), the client side is responsible to choose a default
printer.
See FAQ item about the ${XPRINTER} env var how to set your default
printer).
|
| Q: |
Where can I get more PostScript Type1 fonts from ?
|
| A: |
Some sources:
|
| Q: |
What are PMF fonts (e.g. the *.pmf fonts in
${XPCONFIGDIR}/C/print/models/%model_name%/fonts/ (or
${XPCONFIGDIR}/${LANG}/print/models/%model_name%/fonts/)) ?
|
| A: |
PMF "fonts" are "printer metric files" (.pmf) that describe the metrics
of the fonts (which means they do not contain any data to render the
fonts - they contain only the plain metrics of a font) which are built
into the printer (ROM or via font catridge etc.).
The file format is identical to the PCF ("Portable Compiled Format") font
format except that the bitmap data is not provided.
|
| Q: |
Can I use the fontserver ("xfs") with Xprt ?
|
| A: |
You can use Xprt with the font server ("xfs") like with any other
Xserver - but it is not recommded since the font server protocol does
not allow access to the native font format and therefore disables font
download, e.g. both PS Type1 and TrueType fonts cannot be downloaded
anymore and Xprt will fall-back to embed them as bitmap glyphs in the
print job (e.g. the fonts will still appear correctly in the printout,
but the quality may be reduced since downloaded fonts are always better
than bitmap glyphs).
(users of xprint.mozdev.org-release <= 006 may see
xprint.mozdev.org bug 2092
if they use "xfs"; this has been fixed in the 007 release!)
|
| Q: |
What is a "model-config" ?
|
| A: |
The term "model-config" refers to the subdirs in
${XPCONFIGDIR}/${LANG}/print/models/.
There subdirs contain information
about the attributes for a specific printer model or family/class of
printer models. In particular there are two kinds of information:
"${XPCONFIGDIR}/${LANG}/print/models/${NAME_OF_MODEL}/model-config"
this file defines a set of attributes supported by this specific printer
(-family/-class/etc.)
and
"${XPCONFIGDIR}/${LANG}/print/models/${NAME_OF_MODEL}/fonts/" - a
directory which contains a set of PMF (printer metrics file) fonts
builtin into the printer itself (actually the PMF "font" format
contains only metrics information and no glyphs).
These fonts are only available to the application after the
application has selected a printer and configured it (for developers:
After XpSetContext has been called).
|
| Q: |
Where can I store the default values for printers ?
|
| A: |
XXX
|
| Q: |
How can I create my own model-config ?
|
| A: |
XXX
|
| Q: |
How can I create my own PMF "fonts" ?
|
| A: |
XXX - no solution yet, but
xprint.mozdev.org bug 2430
("RFE: Need tool to create PMF (printer metrics file) fonts")
has been filed to create a freeware tool to create such fonts.
|
| Q: |
Where can I get more model-configs from ?
|
| A: |
If you miss a model-config for your printer please open a bug/RFE at
http://xprint.freedesktop.org/bugzilla/enter_bug.cgi?product=xprint&component=Server%3A%20Config%3A%20model-configs
(e.g. http://xprint.freedesktop.org/bugzilla/enter_bug.cgi, product "Xprint", component
"Server: Config: model-configs").
|
| Q: |
If I install Xprt &co. as "root" in the default location and don't need
to set ${XPCONFIGDIR} - where are my configuration files located then ?
|
| A: |
This is platform-specific, based on the "XPrintDir" Imake variable set
at build time. Default location for plain X11R6.x is
"${XProjectRoot}/lib/X11/xserver" (set at build time), but some
platforms modify "XPrintDir" to alternate locations:
Solaris sets ${XPCONFIGDIR} to /usr/openwin/server/etc/XpConfig/
Linux (non-Debian) sets ${XPCONFIGDIR} to /usr/X11R6/lib/X11/xserver/
or /etc/X11/xserver/
Debian Linux sets ${XPCONFIGDIR} to /usr/share/Xprint/xserver/
Tip
If you don't know where the default location for ${XPCONFIGDIR} is
located try
strings -a /usr/openwin/bin/Xprt | grep XPRINTDIR
- it may
return some debug info from the binary containing the builtin XpConfig
path.
|
| Q: |
Are config files and/or the PMF fonts architecture dependent ?
|
| A: |
The PMF fonts are a variant of the PCF font format, they are
(like the PCF format) architecture-independent.
These fonts must be kept together with the other model config data since
they depend on the printer model (de facto
${XPCONFIGDIR}/C/print/models/ (and/or
${XPCONFIGDIR}/${LANG}/print/models/) should be supplied by the printer
vendors (but most people will create their own models on demand since
I doubt that any vendor except HP, Sun and xprint.mozdev.org staff ever
looked at that stuff)).
Per definition they are read-only data supplied by the vendor, but
modifying them may be usefull, too.
I would say it is recommended to put treat all Xprint files in
${XPCONFIGDIR} as read-only vendor data; admins should create copies of
this tree on demand (and/or (soft-)link some files) and set
${XPCONFIGDIR} to the modified config data.
|
| Q: |
Can I localise my Xprint/Xprt configuration (l10n) ?
|
| A: |
Yes, Xprt supports localisation ("l10n") by default. Default values for
all locales are stored in ${XPCONFIGDIR}/C/print/, locale-specific
settings can be set in ${XPCONFIGDIR}/${LANG}/print/
Rules:
Attribute pools
("${XPCONFIGDIR}/*/print/attributes/document",
"${XPCONFIGDIR}/*/print/attributes/job",
"${XPCONFIGDIR}/*/print/attributes/printer" and
"${XPCONFIGDIR}/*/print/models/*/model-config"):
"document", "job" and "printer" attribute pools and printer
model-configs are sourced first from the
"${XPCONFIGDIR}/C/print/"-directory, then they are overridden by any
attributes from the locale-specific pools (in
"${XPCONFIGDIR}/${LANG}/print/"), e.g. any values set in
"${XPCONFIGDIR}/C/print/attributes/*" and
"${XPCONFIGDIR}/C/print/models/*/model-config" will automatically
apply to all other locales unless they are overridden by
locale-specific versions of these files
("${XPCONFIGDIR}/${LANG}/print/attr
|