Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/Attic/ChangeLog,v retrieving revision 1.1.6.4 diff -u -r1.1.6.4 ChangeLog --- a/xc/ChangeLog 18 Apr 2004 03:00:42 -0000 1.1.6.4 +++ b/xc/ChangeLog 21 Apr 2004 09:33:43 -0000 @@ -1,3 +1,288 @@ +2004-04-21 Roland Mainz + * xc/xf86Date.h + * xc/config/cf/FreeBSD.cf + * xc/config/cf/Imake.tmpl + * xc/config/cf/NetBSD.cf + * xc/config/cf/OpenBSDLib.tmpl + * xc/config/cf/README + * xc/config/cf/WinLib.tmpl + * xc/config/cf/X11.tmpl + * xc/config/cf/bsdLib.tmpl + * xc/config/cf/bsdiLib.tmpl + * xc/config/cf/cygwin.tmpl + * xc/config/cf/darwinLib.tmpl + * xc/config/cf/gnuLib.tmpl + * xc/config/cf/hpLib.tmpl + * xc/config/cf/ibmLib.tmpl + * xc/config/cf/linux.cf + * xc/config/cf/lnxLib.tmpl + * xc/config/cf/os2Lib.tmpl + * xc/config/cf/osfLib.tmpl + * xc/config/cf/sco5.cf + * xc/config/cf/sun.cf + * xc/config/cf/sunLib.tmpl + * xc/config/cf/sv4Lib.tmpl + * xc/config/cf/xprint_site.def + * xc/config/docbook/docbookconv.sh + * xc/doc/hardcopy/Imakefile + * xc/doc/hardcopy/XPRINT/Imakefile + * xc/doc/hardcopy/XPRINT/Xprint_FAQ.html + * xc/doc/hardcopy/XPRINT/Xprint_FAQ.txt + * xc/doc/hardcopy/XPRINT/Xprint_FAQ.xml + * xc/doc/hardcopy/XPRINT/Xprint_old_FAQ.txt + * xc/doc/hardcopy/XPRINT/docbook.css + * xc/doc/hardcopy/XPRINT/dtprint_fspec.PS.gz + * xc/extras/freetype2/include/freetype/config/ftoption.h + * xc/extras/ttf2pt1/CHANGES.html + * xc/extras/ttf2pt1/COPYRIGHT + * xc/extras/ttf2pt1/FONTS.hpux.html + * xc/extras/ttf2pt1/FONTS.html + * xc/extras/ttf2pt1/Makefile + * xc/extras/ttf2pt1/README.FIRST + * xc/extras/ttf2pt1/README.html + * xc/extras/ttf2pt1/bdf.c + * xc/extras/ttf2pt1/bitmap.c + * xc/extras/ttf2pt1/byteorder.h + * xc/extras/ttf2pt1/cygbuild.sh + * xc/extras/ttf2pt1/ft.c + * xc/extras/ttf2pt1/global.h + * xc/extras/ttf2pt1/pt1.c + * xc/extras/ttf2pt1/pt1.h + * xc/extras/ttf2pt1/runt1asm.c + * xc/extras/ttf2pt1/t1asm.c + * xc/extras/ttf2pt1/ttf.c + * xc/extras/ttf2pt1/ttf.h + * xc/extras/ttf2pt1/ttf2pt1.1 + * xc/extras/ttf2pt1/ttf2pt1.c + * xc/extras/ttf2pt1/ttf2pt1_convert.1 + * xc/extras/ttf2pt1/ttf2pt1_x2gs.1 + * xc/extras/ttf2pt1/version.h + * xc/extras/ttf2pt1/winbuild.bat + * xc/extras/ttf2pt1/windows.h + * xc/lib/Imakefile + * xc/lib/Xaw/AllWidgets.c + * xc/lib/Xaw/Imakefile + * xc/lib/Xaw/Print.h + * xc/lib/Xaw/PrintSP.h + * xc/lib/Xaw/PrintShell.c + * xc/lib/Xaw/XawI18n.h + * xc/lib/Xaw/XawInit.c + * xc/lib/Xaw/XawInit.h + * xc/lib/Xaw/sharedlib.c + * xc/lib/XprintAppUtil/Imakefile + * xc/lib/XprintAppUtil/xpapputil.c + * xc/lib/XprintAppUtil/xpapputil.h + * xc/lib/XprintUtil/Imakefile + * xc/lib/XprintUtil/xprintutil.c + * xc/lib/XprintUtil/xprintutil.h + * xc/lib/XprintUtil/xprintutil_printtofile.c + * xc/lib/dpstk/Imakefile + * xc/lib/font/FreeType/ftfuncs.c + * xc/lib/font/bitmap/pcfread.c + * xc/lib/font/util/Imakefile + * xc/lib/font/util/utilbitmap.c + * xc/programs/Imakefile + * xc/programs/Xserver/Imakefile + * xc/programs/Xserver/XpConfig/Imakefile + * xc/programs/Xserver/XpConfig/C/Imakefile + * xc/programs/Xserver/XpConfig/C/print/Imakefile + * xc/programs/Xserver/XpConfig/C/print/Xprinters + * xc/programs/Xserver/XpConfig/C/print/attributes/Imakefile + * xc/programs/Xserver/XpConfig/C/print/attributes/document + * xc/programs/Xserver/XpConfig/C/print/attributes/printer + * xc/programs/Xserver/XpConfig/C/print/ddx-config/Imakefile + * xc/programs/Xserver/XpConfig/C/print/ddx-config/raster/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/CANONBJ10E-GS/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/CANONBJ10E-GS/model-config + * xc/programs/Xserver/XpConfig/C/print/models/GSdefault/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/GSdefault/model-config + * xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/model-config + * xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/fonts/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/HPDJ1600C/fonts/fonts.alias + * xc/programs/Xserver/XpConfig/C/print/models/HPLJ4050-PS/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/HPLJ4050-PS/model-config + * xc/programs/Xserver/XpConfig/C/print/models/HPLJ4050-PS/fonts/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/model-config + * xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/fonts/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/HPLJ4family/fonts/fonts.alias + * xc/programs/Xserver/XpConfig/C/print/models/PS2PDFspooldir-GS/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/PS2PDFspooldir-GS/model-config + * xc/programs/Xserver/XpConfig/C/print/models/PS2PDFspooldir-GS/ps2pdf_spooltodir.sh + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/model-config + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/AvantGarde-Book.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/AvantGarde-BookOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/AvantGarde-Demi.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/AvantGarde-DemiOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Courier-Bold.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Courier-BoldOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Courier-Oblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Courier.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Helvetica-Bold.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Helvetica-BoldOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Helvetica-Oblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Helvetica.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/LubalinGraph-Book.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/LubalinGraph-BookOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/LubalinGraph-Demi.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/LubalinGraph-DemiOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/NewCenturySchlbk-Bold.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/NewCenturySchlbk-BoldItalic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/NewCenturySchlbk-Italic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/NewCenturySchlbk-Roman.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Souvenir-Demi.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Souvenir-DemiItalic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Souvenir-Light.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Souvenir-LightItalic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Symbol.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Times-Bold.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Times-BoldItalic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Times-Italic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/Times-Roman.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSdefault/fonts/ZapfDingbats.pmf + * xc/programs/Xserver/XpConfig/C/print/models/PSspooldir/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/PSspooldir/model-config + * xc/programs/Xserver/XpConfig/C/print/models/PSspooldir/spooltodir.sh + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/model-config + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/AvantGarde-Book.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/AvantGarde-BookOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/AvantGarde-Demi.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/AvantGarde-DemiOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Courier-Bold.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Courier-BoldOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Courier-Oblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Courier.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Helvetica-Bold.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Helvetica-BoldOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Helvetica-Oblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Helvetica.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Imakefile + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/LubalinGraph-Book.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/LubalinGraph-BookOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/LubalinGraph-Demi.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/LubalinGraph-DemiOblique.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/NewCenturySchlbk-Bold.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/NewCenturySchlbk-BoldItalic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/NewCenturySchlbk-Italic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/NewCenturySchlbk-Roman.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Souvenir-Demi.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Souvenir-DemiItalic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Souvenir-Light.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Souvenir-LightItalic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Symbol.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Times-Bold.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Times-BoldItalic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Times-Italic.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/Times-Roman.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/ZapfDingbats.pmf + * xc/programs/Xserver/XpConfig/C/print/models/SPSPARC2/fonts/fonts.dir + * xc/programs/Xserver/XpConfig/en_US/Imakefile + * xc/programs/Xserver/XpConfig/en_US/print/Imakefile + * xc/programs/Xserver/XpConfig/en_US/print/attributes/Imakefile + * xc/programs/Xserver/XpConfig/en_US/print/attributes/document + * xc/programs/Xserver/Xprint/AttrValid.c + * xc/programs/Xserver/Xprint/AttrValid.h + * xc/programs/Xserver/Xprint/DiPrint.h + * xc/programs/Xserver/Xprint/Imakefile + * xc/programs/Xserver/Xprint/Init.c + * xc/programs/Xserver/Xprint/Oid.c + * xc/programs/Xserver/Xprint/Oid.h + * xc/programs/Xserver/Xprint/OidDefs.h + * xc/programs/Xserver/Xprint/OidStrs.h + * xc/programs/Xserver/Xprint/Xprint.html + * xc/programs/Xserver/Xprint/Xprint.man + * xc/programs/Xserver/Xprint/Xprint.sgml + * xc/programs/Xserver/Xprint/attributes.c + * xc/programs/Xserver/Xprint/attributes.h + * xc/programs/Xserver/Xprint/ddxInit.c + * xc/programs/Xserver/Xprint/mediaSizes.c + * xc/programs/Xserver/Xprint/spooler.c + * xc/programs/Xserver/Xprint/spooler.h + * xc/programs/Xserver/Xprint/etc/Imakefile + * xc/programs/Xserver/Xprint/etc/Xsession.d/Imakefile + * xc/programs/Xserver/Xprint/etc/Xsession.d/cde_xsessiond_xprint.sh + * xc/programs/Xserver/Xprint/etc/init.d/Imakefile + * xc/programs/Xserver/Xprint/etc/init.d/xprint + * xc/programs/Xserver/Xprint/etc/profile.d/Imakefile + * xc/programs/Xserver/Xprint/etc/profile.d/xprint.csh + * xc/programs/Xserver/Xprint/etc/profile.d/xprint.sh + * xc/programs/Xserver/Xprint/pdf/README + * xc/programs/Xserver/Xprint/ps/Imakefile + * xc/programs/Xserver/Xprint/ps/Ps.h + * xc/programs/Xserver/Xprint/ps/PsArea.c + * xc/programs/Xserver/Xprint/ps/PsAttVal.c + * xc/programs/Xserver/Xprint/ps/PsAttr.c + * xc/programs/Xserver/Xprint/ps/PsCache.c + * xc/programs/Xserver/Xprint/ps/PsColor.c + * xc/programs/Xserver/Xprint/ps/PsFTFonts.c + * xc/programs/Xserver/Xprint/ps/PsFonts.c + * xc/programs/Xserver/Xprint/ps/PsGC.c + * xc/programs/Xserver/Xprint/ps/PsInit.c + * xc/programs/Xserver/Xprint/ps/PsLine.c + * xc/programs/Xserver/Xprint/ps/PsMisc.c + * xc/programs/Xserver/Xprint/ps/PsPixel.c + * xc/programs/Xserver/Xprint/ps/PsPixmap.c + * xc/programs/Xserver/Xprint/ps/PsPolygon.c + * xc/programs/Xserver/Xprint/ps/PsPrint.c + * xc/programs/Xserver/Xprint/ps/PsText.c + * xc/programs/Xserver/Xprint/ps/PsWindow.c + * xc/programs/Xserver/Xprint/ps/psout.c + * xc/programs/Xserver/Xprint/ps/psout.h + * xc/programs/Xserver/Xprint/ps/psout_ft.c + * xc/programs/Xserver/Xprint/ps/psout_ftpstype1.c + * xc/programs/Xserver/Xprint/ps/psout_ftpstype3.c + * xc/programs/Xserver/Xprint/raster/Imakefile + * xc/programs/Xserver/Xprint/raster/Raster.h + * xc/programs/Xserver/Xprint/svg/README + * xc/programs/Xserver/Xprint/windows/README + * xc/programs/Xserver/dix/dispatch.c + * xc/programs/Xserver/dix/main.c + * xc/programs/Xserver/hw/darwin/darwin.c + * xc/programs/Xserver/hw/sun/sunIo.c + * xc/programs/Xserver/hw/sunLynx/sunLyIo.c + * xc/programs/Xserver/hw/vfb/InitOutput.c + * xc/programs/Xserver/hw/xfree86/common/xf86Init.c + * xc/programs/Xserver/hw/xnest/Args.c + * xc/programs/Xserver/hw/xwin/InitOutput.c + * xc/programs/Xserver/include/os.h + * xc/programs/Xserver/os/utils.c + * xc/programs/xlogo/Imakefile + * xc/programs/xphelloworld/Imakefile + * xc/programs/xphelloworld/xpawhelloworld/Imakefile + * xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c + * xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.man + * xc/programs/xphelloworld/xphelloworld/Imakefile + * xc/programs/xphelloworld/xphelloworld/xphelloworld.c + * xc/programs/xphelloworld/xphelloworld/xphelloworld.html + * xc/programs/xphelloworld/xphelloworld/xphelloworld.man + * xc/programs/xphelloworld/xphelloworld/xphelloworld.sgml + * xc/programs/xphelloworld/xpsimplehelloworld/Imakefile + * xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.c + * xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.html + * xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.man + * xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.sgml + * xc/programs/xphelloworld/xpxmhelloworld/Imakefile + * xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.c + * xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.html + * xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.man + * xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.sgml + * xc/programs/xphelloworld/xpxthelloworld/Imakefile + * xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.c + * xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.html + * xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.man + * xc/programs/xphelloworld/xpxthelloworld/xpxthelloworld.sgml + * xc/programs/xplsprinters/Imakefile + * xc/programs/xplsprinters/xplsprinters.c + * xc/programs/xplsprinters/xplsprinters.html + * xc/programs/xplsprinters/xplsprinters.man + * xc/programs/xplsprinters/xplsprinters.sgml + Bugzilla #530: Land XPRINT branch on XORG-CURRENT + 2004-04-17 Alan Coopersmith * xc/config/cf/sun.cf Index: xc/xf86Date.h =================================================================== RCS file: xc/xf86Date.h diff -N xc/xf86Date.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/xf86Date.h 21 Apr 2004 09:33:43 -0000 @@ -0,0 +1 @@ +XCOMM empty file Index: xc/config/cf/FreeBSD.cf =================================================================== RCS file: /cvs/xorg/xc/config/cf/FreeBSD.cf,v retrieving revision 1.1.4.7 diff -u -r1.1.4.7 FreeBSD.cf --- a/xc/config/cf/FreeBSD.cf 15 Apr 2004 10:13:10 -0000 1.1.4.7 +++ b/xc/config/cf/FreeBSD.cf 21 Apr 2004 09:33:43 -0000 @@ -71,7 +71,15 @@ #define HasNCurses YES #define HasVarRun YES #define HasVarDb YES - +#ifndef HasMotif +# define HasMotif YES +#endif /* !HasMotif */ +#ifndef HasMotif2 +# define HasMotif2 YES +#endif /* !HasMotif2 */ +#ifndef HasGhostScript +# define HasGhostScript YES +#endif /* !HasGhostScript */ #if (OSMajorVersion >= 3) #define HasIssetugid YES #define HasPoll YES Index: xc/config/cf/Imake.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/Imake.tmpl,v retrieving revision 1.1.4.9 diff -u -r1.1.4.9 Imake.tmpl --- a/xc/config/cf/Imake.tmpl 17 Apr 2004 18:47:05 -0000 1.1.4.9 +++ b/xc/config/cf/Imake.tmpl 21 Apr 2004 09:33:44 -0000 @@ -371,6 +371,9 @@ #ifndef HasMotif #define HasMotif NO #endif +#ifndef HasMotif2 +#define HasMotif2 NO /* only if system has working Motif2 or OpenMotif */ +#endif #ifndef HasBSDAuth #define HasBSDAuth NO #endif @@ -1526,6 +1529,9 @@ #ifndef GhostScriptCmd #define GhostScriptCmd gs #endif +#ifndef HasGhostPCL +#define HasGhostPCL NO +#endif #ifndef HasGhostScript #define HasGhostScript NO #endif Index: xc/config/cf/NetBSD.cf =================================================================== RCS file: /cvs/xorg/xc/config/cf/NetBSD.cf,v retrieving revision 1.1.4.5 diff -u -r1.1.4.5 NetBSD.cf --- a/xc/config/cf/NetBSD.cf 15 Apr 2004 10:13:10 -0000 1.1.4.5 +++ b/xc/config/cf/NetBSD.cf 21 Apr 2004 09:33:44 -0000 @@ -47,6 +47,15 @@ #ifndef HasLibCrypt # define HasLibCrypt YES #endif +#ifndef HasMotif +# define HasMotif YES +#endif /* !HasMotif */ +#ifndef HasMotif2 +# define HasMotif2 YES +#endif /* !HasMotif2 */ +#ifndef HasGhostScript +# define HasGhostScript YES +#endif /* !HasGhostScript */ #ifndef HasShm # if OSMajorVersion == 0 && OSMinorVersion == 9 && OSTeenyVersion == 2 /* Index: xc/config/cf/OpenBSDLib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/OpenBSDLib.tmpl,v retrieving revision 1.1.4.5 diff -u -r1.1.4.5 OpenBSDLib.tmpl --- a/xc/config/cf/OpenBSDLib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.5 +++ b/xc/config/cf/OpenBSDLib.tmpl 21 Apr 2004 09:33:44 -0000 @@ -1,4 +1,4 @@ -XCOMM platform: $XdotOrg: xc/config/cf/OpenBSDLib.tmpl,v 1.1.4.5 2004/03/05 13:38:11 eich Exp $ +XCOMM platform: $XdotOrg: xc/config/cf/OpenBSDLib.tmpl,v 1.1.4.4.2.1 2004/03/04 17:45:37 eich Exp $ XCOMM platform: $OpenBSD: OpenBSDLib.tmpl,v 1.6 2003/04/04 19:48:58 matthieu Exp $ XCOMM platform: $XFree86: xc/config/cf/OpenBSDLib.tmpl,v 1.8 2003/10/15 21:23:37 herrb Exp $ XCOMM Index: xc/config/cf/README =================================================================== RCS file: /cvs/xorg/xc/config/cf/README,v retrieving revision 1.1.4.4 diff -u -r1.1.4.4 README --- a/xc/config/cf/README 5 Mar 2004 13:38:11 -0000 1.1.4.4 +++ b/xc/config/cf/README 21 Apr 2004 09:33:45 -0000 @@ -66,11 +66,15 @@ HasGcc2 boolean for system has GNU gcc 2.x compiler HasGcc2ForCplusplus use gcc 2 for C++ programs? HasGnuMake use the GNU make program? + HasGhostPCL boolean for system has GhostPCL + HasGhostScript boolean for system has GhostScript HasKrbIV system has Kerberos version IV support? HasKrb5 system has Kerberos version 5 support? HasLargeTmp boolean for system has /tmp space HasLatex system has LaTeX document preparation software HasLibCrypt boolean for system has libcrypt + HasMotif boolean for system has Motif + HasMotif2 boolean for system has Motif2 or OpenMotif HasNdbm boolean for system has ndbm routines HasPoll use poll() syscall? HasPurify boolean for system has Purify @@ -322,6 +326,12 @@ XinitDir directory in which to install xinit files XPrintDir parent of X Print server config directory XprtServer build the X Print server + XpRasterDDX include the raster print ddx driver + XpColorPclDDX include the color PCL print ddx driver + XpMonoPclDDX include the monochrome PCL print ddx driver + XpPostScriptDDX include the PostScript print ddx driver + XpPdfDDX include the PDF print ddx driver + XpSvgDDX include the SVG print ddx driver XmanLocalSearchPath non-standard path for man pages XtErrorPrefix leading text in XtError() msg; eg. 'X Toolkit ' XtWarningPrefix leading text in XtWarning()msg, same as above @@ -452,10 +462,6 @@ HasShadowPasswd system has getspnam() function XnestServer build X server with Xlib-based ddx XVirtualFramebufferServer build X server with virtual memory framebuffer - XpRasterDDX include the raster print ddx driver - XpColorPclDDX include the color PCL print ddx driver - XpMonoPclDDX include the monochrome PCL print ddx driver - XpPostScriptDDX include the PostScript print ddx driver WebServer host:port of your Web server (see programs/xrx) HtmlDir path used by Web server for HTML and RX docs CgiBinDir path used by Web server for CGI programs Index: xc/config/cf/WinLib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/WinLib.tmpl,v retrieving revision 1.1.4.3 diff -u -r1.1.4.3 WinLib.tmpl --- a/xc/config/cf/WinLib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.3 +++ b/xc/config/cf/WinLib.tmpl 21 Apr 2004 09:33:45 -0000 @@ -6,7 +6,7 @@ #define SharedOldXReqs $(LDPRELIBS) $(XONLYLIB) #define SharedXtReqs $(LDPRELIBS) $(XONLYLIB) -#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XLIB) +#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) #define SharedXmuReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB) #define SharedXextReqs $(LDPRELIBS) $(XONLYLIB) #define SharedXiReqs $(LDPRELIBS) $(XLIB) Index: xc/config/cf/X11.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/X11.tmpl,v retrieving revision 1.1.4.12 diff -u -r1.1.4.12 X11.tmpl --- a/xc/config/cf/X11.tmpl 15 Apr 2004 10:13:10 -0000 1.1.4.12 +++ b/xc/config/cf/X11.tmpl 21 Apr 2004 09:33:46 -0000 @@ -462,6 +462,24 @@ #ifndef XprtServer #define XprtServer BuildServer #endif +#ifndef XpRasterDDX +#define XpRasterDDX YES +#endif +#ifndef XpColorPclDDX +#define XpColorPclDDX YES +#endif +#ifndef XpMonoPclDDX +#define XpMonoPclDDX YES +#endif +#ifndef XpPostScriptDDX +#define XpPostScriptDDX YES +#endif +#ifndef XpPdfDDX +#define XpPdfDDX YES +#endif +#ifndef XpSvgDDX +#define XpSvgDDX YES +#endif #ifndef BuildXprint #if XprtServer #define BuildXprint YES @@ -470,7 +488,7 @@ #endif #endif #ifndef BuildXprintLib -#define BuildXprintLib (BuildXprint && !BuildServersOnly) +#define BuildXprintLib !BuildServersOnly #endif #ifndef BuildScreenSaverExt #define BuildScreenSaverExt NO @@ -3665,10 +3683,10 @@ #endif #ifndef XawClientDepLibs -#define XawClientDepLibs $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXPMLIB) $(DEPXLIB) +#define XawClientDepLibs $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXPMLIB) $(DEPXPLIB) $(DEPXLIB) #endif #ifndef XawClientLibs -#define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #endif #ifndef SharedLibXTrap @@ -4093,6 +4111,37 @@ #endif #endif +/* + * InstallXpPMFLink - install link for a Xprint PMF "font" from one + * print model to another + */ +#ifndef InstallXpPMFLink +#define InstallXpPMFLink(fontfilename,srcmodelfontdir,destmodelfontdir) @@\ + InstallLink(install,srcmodelfontdir/fontfilename,fontfilename,destmodelfontdir) +#endif /* InstallXpPMFLink */ +/* + * InstallXpMultiplePMFLinks - install multiple links for PMF fonts + * from one print model to another + */ +#ifndef InstallXpMultiplePMFLinks +#define InstallXpMultiplePMFLinks(list,srcmodelfontdir,destmodelfontdir) @@\ +install:: @@\ + MakeDir($(DESTDIR)destmodelfontdir) @@\ + for i in list ; do \ @@\ + $(RM) $(DESTDIR)destmodelfontdir/$$i ; \ @@\ + $(LN) -s -f srcmodelfontdir/$$i $(DESTDIR)destmodelfontdir/$$i ; \ @@\ + done +#endif /* InstallXpPMFLink */ + +/* + * InstallXpPMFFontsDir - make and install a fonts.dir index for model-config fonts + */ +#ifndef InstallXpPMFFontsDir +#define InstallXpPMFFontsDir(destmodelfontdir) @@\ +install:: @@\ + (cd $(DESTDIR)destmodelfontdir ; $(DESTDIR)$(BINDIR)/mkfontscale -b -s -l) +#endif /* InstallXpPMFFontsDir */ + /* * MakeXkbDir Index: xc/config/cf/bsdLib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/bsdLib.tmpl,v retrieving revision 1.1.4.3 diff -u -r1.1.4.3 bsdLib.tmpl --- a/xc/config/cf/bsdLib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.3 +++ b/xc/config/cf/bsdLib.tmpl 21 Apr 2004 09:33:46 -0000 @@ -43,7 +43,7 @@ #endif #ifndef XawClientLibs -#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #endif /* Allow for libpthread, as overridden by OS definitions */ @@ -56,8 +56,8 @@ #ifndef SharedXtReqs #define SharedXtReqs $(LDPRELIBS) $(XONLYLIB) $(SMLIB) $(ICELIB) #endif -#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) -#define SharedXaw6Reqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XLIB) +#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) +#define SharedXaw6Reqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) #define SharedXmuReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB) #define SharedXmuuReqs $(LDPRELIB) $(XONLYLIB) #define SharedXextReqs $(LDPRELIBS) $(XONLYLIB) Index: xc/config/cf/bsdiLib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/bsdiLib.tmpl,v retrieving revision 1.1.4.2 diff -u -r1.1.4.2 bsdiLib.tmpl --- a/xc/config/cf/bsdiLib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.2 +++ b/xc/config/cf/bsdiLib.tmpl 21 Apr 2004 09:33:46 -0000 @@ -16,7 +16,7 @@ #endif #ifndef XawClientLibs -#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #endif #define FrescoSysLibs CplusplusLibC MathLibrary @@ -25,8 +25,8 @@ #define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB) #define SharedOldXReqs $(LDPRELIB) $(XONLYLIB) #define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB) -#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) -#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB) +#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) +#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) #define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB) #define SharedXextReqs $(LDPRELIB) $(XONLYLIB) #define SharedXiReqs $(LDPRELIB) $(XLIB) Index: xc/config/cf/cygwin.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/cygwin.tmpl,v retrieving revision 1.1.4.4 diff -u -r1.1.4.4 cygwin.tmpl --- a/xc/config/cf/cygwin.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.4 +++ b/xc/config/cf/cygwin.tmpl 21 Apr 2004 09:33:46 -0000 @@ -9,8 +9,8 @@ #define SharedOldXReqs $(LDPRELIB) $(XONLYLIB) #define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) #define SharedXtReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XONLYLIB) -#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) -#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) +#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB) #define SharedXextReqs $(LDPRELIB) $(XONLYLIB) #define SharedXiReqs $(LDPRELIB) $(XLIB) @@ -57,7 +57,7 @@ #endif #ifndef XawClientLibs -# define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB) +# define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #endif Index: xc/config/cf/darwinLib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/darwinLib.tmpl,v retrieving revision 1.1.4.2 diff -u -r1.1.4.2 darwinLib.tmpl --- a/xc/config/cf/darwinLib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.2 +++ b/xc/config/cf/darwinLib.tmpl 21 Apr 2004 09:33:46 -0000 @@ -10,7 +10,7 @@ #endif #ifndef XawClientLibs -#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #endif /* Allow for libpthread, as overridden by OS definitions */ @@ -27,8 +27,8 @@ #define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB) #define SharedOSMesaReqs $(LDPRELIB) $(XLIB) $(GLXLIB) #define SharedSMReqs $(LDPRELIB) $(ICELIB) -#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) -#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB) +#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) +#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) #define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB) #define SharedXextReqs $(LDPRELIB) $(XONLYLIB) #define SharedXiReqs $(LDPRELIB) $(XLIB) Index: xc/config/cf/gnuLib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/gnuLib.tmpl,v retrieving revision 1.1.4.2 diff -u -r1.1.4.2 gnuLib.tmpl --- a/xc/config/cf/gnuLib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.2 +++ b/xc/config/cf/gnuLib.tmpl 21 Apr 2004 09:33:46 -0000 @@ -11,15 +11,15 @@ #endif #ifndef XawClientLibs -#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #endif #define SharedX11Reqs #define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB) #define SharedOldXReqs $(LDPRELIB) $(XONLYLIB) #define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB) -#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB) -#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) +#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB) #define SharedXextReqs $(LDPRELIB) $(XONLYLIB) #define SharedXiReqs $(LDPRELIB) $(XLIB) Index: xc/config/cf/hpLib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/hpLib.tmpl,v retrieving revision 1.1.4.2 diff -u -r1.1.4.2 hpLib.tmpl --- a/xc/config/cf/hpLib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.2 +++ b/xc/config/cf/hpLib.tmpl 21 Apr 2004 09:33:46 -0000 @@ -12,7 +12,7 @@ #define SharedOldXReqs $(XONLYLIB) #define SharedX11Reqs SharedThreadReqs #define SharedXtReqs $(XONLYLIB) $(SMLIB) $(ICELIB) SharedThreadReqs -#define SharedXawReqs $(XMULIB) $(XTOOLLIB) $(XLIB) +#define SharedXawReqs $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) #define SharedXmuReqs $(XTOOLLIB) $(XLIB) #define SharedXextReqs $(XONLYLIB) #define SharedXiReqs $(XLIB) Index: xc/config/cf/ibmLib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/ibmLib.tmpl,v retrieving revision 1.1.4.5 diff -u -r1.1.4.5 ibmLib.tmpl --- a/xc/config/cf/ibmLib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.5 +++ b/xc/config/cf/ibmLib.tmpl 21 Apr 2004 09:33:46 -0000 @@ -1,5 +1,5 @@ XCOMM $Xorg: ibmLib.tmpl,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ -XCOMM $XdotOrg: xc/config/cf/ibmLib.tmpl,v 1.1.4.5 2004/03/05 13:38:11 eich Exp $ +XCOMM $XdotOrg: xc/config/cf/ibmLib.tmpl,v 1.1.4.4.4.1.6.1 2004/04/13 23:32:20 gisburn Exp $ /* * AIX shared library template @@ -35,8 +35,8 @@ #define SharedXmuuReqs $(XLIBONLY) #define SharedOldXReqs $(XLIBONLY) #define SharedXtReqs $(XLIBONLY) $(SMLIB) $(ICELIB) SharedThreadReqs -#define SharedXawReqs $(XMULIB) $(XTOOLLIB) $(XLIB) $(XPMLIB) -#define SharedXaw6Reqs $(XMULIB) $(XTOOLLIB) $(XLIB) +#define SharedXawReqs $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(XPMLIB) +#define SharedXaw6Reqs $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) #define SharedXiReqs $(XLIB) #define SharedXtstReqs $(XLIB) #define SharedPexReqs $(XONLYLIB) Index: xc/config/cf/linux.cf =================================================================== RCS file: /cvs/xorg/xc/config/cf/linux.cf,v retrieving revision 1.1.4.8 diff -u -r1.1.4.8 linux.cf --- a/xc/config/cf/linux.cf 15 Apr 2004 10:13:10 -0000 1.1.4.8 +++ b/xc/config/cf/linux.cf 21 Apr 2004 09:33:47 -0000 @@ -206,6 +206,16 @@ # endif #endif +#ifndef HasMotif +# define HasMotif YES +#endif /* !HasMotif */ +#ifndef HasMotif2 +# define HasMotif2 YES +#endif /* !HasMotif2 */ +#ifndef HasGhostScript +# define HasGhostScript YES +#endif /* !HasGhostScript */ + #if LinuxCLibMajorVersion >= 6 # define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \ -D_POSIX_SOURCE -D_XOPEN_SOURCE \ @@ -452,7 +462,9 @@ # endif #endif #define HasPutenv YES -#define HasShm YES +#ifndef HasShm +# define HasShm YES +#endif #define HasSockets YES #if UseElfFormat || defined(AlphaArchitecture) #ifndef HasSnprintf Index: xc/config/cf/lnxLib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/lnxLib.tmpl,v retrieving revision 1.1.4.5 diff -u -r1.1.4.5 lnxLib.tmpl --- a/xc/config/cf/lnxLib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.5 +++ b/xc/config/cf/lnxLib.tmpl 21 Apr 2004 09:33:47 -0000 @@ -14,15 +14,15 @@ #endif #ifndef XawClientLibs -#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #endif #define SharedX11Reqs #define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB) #define SharedOldXReqs $(LDPRELIB) $(XONLYLIB) #define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB) -#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB) -#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) +#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB) #define SharedXmuuReqs $(LDPRELIB) $(XONLYLIB) #define SharedXextReqs $(LDPRELIB) $(XONLYLIB) Index: xc/config/cf/os2Lib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/os2Lib.tmpl,v retrieving revision 1.1.4.4 diff -u -r1.1.4.4 os2Lib.tmpl --- a/xc/config/cf/os2Lib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.4 +++ b/xc/config/cf/os2Lib.tmpl 21 Apr 2004 09:33:47 -0000 @@ -1,4 +1,4 @@ -XCOMM $XdotOrg: xc/config/cf/os2Lib.tmpl,v 1.1.4.4 2004/03/05 13:38:11 eich Exp $ +XCOMM $XdotOrg: xc/config/cf/os2Lib.tmpl,v 1.1.4.3.4.1.6.1 2004/04/13 23:32:20 gisburn Exp $ XCOMM $Xorg: os2Lib.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ @@ -17,8 +17,8 @@ #define SharedX11Reqs $(LDPRELIB) -lshm #define SharedOldXReqs $(LDPRELIB) $(XONLYLIB) #define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB) -#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB) -#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) +#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB) #define SharedXmuuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB) #define SharedXextReqs $(LDPRELIB) $(XONLYLIB) @@ -151,7 +151,7 @@ DEPXMULIB = XMULIB = _Use(SDlibXmu,-L$(XMUSRC) SDlibXmu) $(XLIB) #ifndef XawClientLibs -#define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #endif #endif #if SharedOldX Index: xc/config/cf/osfLib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/osfLib.tmpl,v retrieving revision 1.1.4.3 diff -u -r1.1.4.3 osfLib.tmpl --- a/xc/config/cf/osfLib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.3 +++ b/xc/config/cf/osfLib.tmpl 21 Apr 2004 09:33:47 -0000 @@ -20,7 +20,7 @@ #endif #define SharedXtReqs $(LDPRELIBS) $(XONLYLIB) $(SMLIB) $(ICELIB) SharedThreadReqs #if ModernOSF1 -#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XLIB) +#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) #else #define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XLIB) -init _XawFixupVendorShell #endif Index: xc/config/cf/sco5.cf =================================================================== RCS file: /cvs/xorg/xc/config/cf/sco5.cf,v retrieving revision 1.1.4.5 diff -u -r1.1.4.5 sco5.cf --- a/xc/config/cf/sco5.cf 15 Apr 2004 10:13:10 -0000 1.1.4.5 +++ b/xc/config/cf/sco5.cf 21 Apr 2004 09:33:47 -0000 @@ -1,5 +1,5 @@ XCOMM $XFree86: xc/config/cf/sco5.cf,v 3.15 2003/12/19 02:05:37 dawes Exp $ -XCOMM $XdotOrg: xc/config/cf/sco5.cf,v 1.1.4.5 2004/04/15 10:13:10 eich Exp $ +XCOMM $XdotOrg: xc/config/cf/sco5.cf,v 1.1.4.3.2.1.6.3 2004/04/13 23:32:20 gisburn Exp $ /* * This is for SCO Open Server 5.0.6A or later. You must have the @@ -212,7 +212,7 @@ #endif #ifndef XawClientLibs -#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB) +#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #endif #define SharedXlibi18nReqs $(LDPRELIB) $(XLIBONLY) @@ -225,8 +225,8 @@ #define SharedPexReqs $(LDPRELIB) $(XONLYLIB) MathLibrary #define SharedSMReqs $(LDPRELIB) $(ICELIB) #define SharedX11Reqs $(LDPRELIB) -lsocket -#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) -#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB) +#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) +#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPLIB) $(XLIB) #define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB) #define SharedXextReqs $(LDPRELIB) $(XONLYLIB) #define SharedXiReqs $(LDPRELIB) $(XLIB) Index: xc/config/cf/sun.cf =================================================================== RCS file: /cvs/xorg/xc/config/cf/sun.cf,v retrieving revision 1.1.4.13 diff -u -r1.1.4.13 sun.cf --- a/xc/config/cf/sun.cf 18 Apr 2004 03:00:42 -0000 1.1.4.13 +++ b/xc/config/cf/sun.cf 21 Apr 2004 09:33:47 -0000 @@ -532,6 +532,15 @@ #define PamLibraries -lpam #endif +#ifndef HasMotif +# define HasMotif YES +#endif /* !HasMotif */ +#ifndef HasMotif2 +/* Solaris's Motif2 version is broken and misses XmPrintShell + * (see http://xprint.mozdev.org/bugs/show_bug.cgi?id=1366) */ +# define HasMotif2 NO +#endif /* !HasMotif2 */ + #define MotifDefines \ -DNO_ISDIR -DNO_REGCOMP -DNO_ALLOCA -DBOGUS_MB_MAX -DNO_CONST #define PamUnixDefines -DPAM_NIS Index: xc/config/cf/sunLib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/sunLib.tmpl,v retrieving revision 1.1.4.5 diff -u -r1.1.4.5 sunLib.tmpl --- a/xc/config/cf/sunLib.tmpl 18 Apr 2004 03:00:42 -0000 1.1.4.5 +++ b/xc/config/cf/sunLib.tmpl 21 Apr 2004 09:33:47 -0000 @@ -1,5 +1,5 @@ XCOMM $Xorg: sunLib.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ -XCOMM $XdotOrg: xc/config/cf/sunLib.tmpl,v 1.1.4.5 2004/04/18 03:00:42 alanc Exp $ +XCOMM $XdotOrg: xc/config/cf/sunLib.tmpl,v 1.1.4.2.6.2 2004/03/14 03:27:09 alanc Exp $ Index: xc/config/cf/sv4Lib.tmpl =================================================================== RCS file: /cvs/xorg/xc/config/cf/sv4Lib.tmpl,v retrieving revision 1.1.4.3 diff -u -r1.1.4.3 sv4Lib.tmpl --- a/xc/config/cf/sv4Lib.tmpl 5 Mar 2004 13:38:11 -0000 1.1.4.3 +++ b/xc/config/cf/sv4Lib.tmpl 21 Apr 2004 09:33:47 -0000 @@ -13,7 +13,7 @@ XMULIB = $(XMULIBONLY) -z nodefs #endif #ifndef XawClientLibs -# define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB) +# define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XPLIB) $(XLIB) #endif #if 0 Index: xc/config/cf/xprint_site.def =================================================================== RCS file: xc/config/cf/xprint_site.def diff -N xc/config/cf/xprint_site.def --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/config/cf/xprint_site.def 21 Apr 2004 09:33:47 -0000 @@ -0,0 +1,290 @@ + +/* + * Enable this if you want to build the GISWxprintglue package... + * #define BuildGISWxprintglue YES + * Then do a % make World ; cd packager/solaris/GISWxprintglue/ ; make make_GISWxprintglue + */ + +/* + * Enable this if you want to build the GISWxprint package... + * #define BuildGISWxprint YES + * Then do a % make World ; cd packager/solaris/GISWxprint/ ; make make_GISWxprint + */ + +/* + * Enable this if you want to build the Debian Xprint server package + * #define BuildDebianXprintPackage YES + */ + +/* + * If you build a RPM package from this tree the xprint.spec file + * will set BuildXprintRPMPackage to YES + */ + +/* + * Enable this if you want to build the Mozilla Xprint XPI server package + * #define BuildMozillaXprintXPIPackage YES + */ + +/* HasDocBookTools - set to YES if "xsltproc", "xmllint", "docbook2man", + * "lynx" and the docbook-xsl-stylesheets are installed. + * #define HasDocBookTools YES + */ + +/* ######################################################################### + * ############ xprint.mozdev.org defaults start (do not edit!) ############ + * ######################################################################### + */ + +#ifndef BuildGISWxprintglue +# define BuildGISWxprintglue NO +#endif /* BuildGISWxprintglue */ + +#ifndef BuildGISWxprint +# define BuildGISWxprint NO +#endif /* BuildGISWxprint */ + +#ifndef BuildDebianXprintPackage +# define BuildDebianXprintPackage NO +#endif /* BuildDebianXprintPackage */ + +#ifndef BuildXprintRPMPackage +# define BuildXprintRPMPackage NO +#endif /* BuildXprintRPMPackage */ + +#ifndef BuildMozillaXprintXPIPackage +# define BuildMozillaXprintXPIPackage NO +#endif /* BuildMozillaXprintXPIPackage */ + +/* If we do not build any of the special packages then build and + * install everything */ +#ifndef BuildFullXprintDistrib +# if BuildGISWxprintglue || BuildGISWxprint || BuildDebianXprintPackage || BuildXprintRPMPackage || BuildMozillaXprintXPIPackage +# define BuildFullXprintDistrib NO +# else +# define BuildFullXprintDistrib YES +# endif /* BuildGISWxprintglue || BuildGISWxprint || BuildDebianXprintPackage || BuildXprintRPMPackage || BuildMozillaXprintXPIPackage */ +#endif /* BuildFullXprintDistrib */ + +/* Verify that only one package is enabled at the same time */ +#if (BuildGISWxprintglue + BuildGISWxprint + BuildDebianXprintPackage + BuildXprintRPMPackage + BuildFullXprintDistrib + BuildMozillaXprintXPIPackage) > 1 +# error Building more than one special package is not allowed. +#endif /* Verify */ + +/* Some flags to build the Xprint server (Xprt), the tools and the fonts */ +#define BuildServer YES +#define XprtServer YES + +/* Needed to build encoding files */ +#define BuildFonts YES +#define BuildSpeedoFonts NO +#define BuildType1Fonts NO +#define BuildCIDFonts NO +#define BuildTrueTypeFonts NO +#define BuildEthiopicFonts NO +#define BuildBethMarduthoFonts NO + +#define GzipFontCompression YES +#define BuildFreeType YES +/* Xprt does not have special support for GLX and XIE (yet) */ +#define BuildGlxExt NO +#define BuildXIE NO +/* X extensions not needed */ +#define BuildDBE NO +#define BuildXKB NO +#define BuildRECORD NO +#define BuildDPMS NO +#define BuildXF86VidModeExt NO +#define BuildXInputExt NO +#define BuildScreenSaverExt NO +#define BuildXvExt NO +/* LBX is needed for compatibility to the XWeb stuff */ +#define BuildLBX YES +/* Xprt's non-bitmap based DDX (PS, PCL, PDF, SVGprint etc.) cannot support MIT-SHM */ +#undef HasShm +#define HasShm NO +/* Disable stipple code due portability issues + * (see http://xprint.mozdev.org/bugs/show_bug.cgi?id=2220) */ +#define BuildStippleCode NO + +/* Temporary for Xorg tree */ +#define BuildFontconfigLibrary NO +#define XorgServer NO +#define XF86Server NO +#define XnestServer NO +#define XVirtualFramebufferServer NO + +#define BuildFreetype2Library YES +#define SharedLibFreetype2 NO +#define NormalLibFreetype2 YES + +#define HasFreetype2 NO +#define BuildXTrueType NO +#define BuildType1 NO +#define BuildCID NO +#define BuildSpeedo NO +#define BuildFontCache NO +#define BuildRender NO +#define BuildRenderLibrary NO +#define BuildRandRLibrary NO +#define BuildXcursorLibrary NO +#define BuildXcursorgen NO +#define SharedLibFontEnc NO + +/* Build only Xprint applications */ +#ifndef BuildXprintAppsOnly +#define BuildXprintAppsOnly YES +#endif /* BuildXprintAppsOnly */ + +/* Set our own XVendorString/XVendorRelease + * (and to avoid that xfree86.cf sets it's own stuff here) */ +#define XVendorString "xprint.mozdev.org" +#define XVendorRelease 100000 + +#define UseHackLinkAgainstInstalledX11Libs NO +#if UseHackLinkAgainstInstalledX11Libs +/* "Hack" to reuse an already installed X11 distribution when linking our + * programs (this assumes that the installed X version is at least X11R6.4) */ +# ifndef IBMArchitecture +# define LdPreLib -L$(USRLIBDIR) -R$(USRLIBDIR) -L$(BUILDLIBDIR) +# endif /* !IBMArchitecture */ +#endif /* UseHackLinkAgainstInstalledX11Libs */ + +XCOMM #### Sun/Solaris-specifc stuff ... #### +#if defined(SunArchitecture) && (OSMajorVersion > 4) +#undef XsunServer +#define XsunServer NO + +XCOMM X11R6.7's sun.cf does not set ProjectRoot to /usr/openwin anymore - why ? +#define ProjectRoot /usr/openwin +#define ServerConfigDir /usr/openwin/server/etc + +XCOMM Some build hacks for the GISWxprintglue package +#if BuildGISWxprintglue +# define ProjectRoot /usr/openwin +# define ServerConfigDir /usr/openwin/server/etc +# define BinDir /opt/GISWxprintglue/bin +# define ManDirectoryRoot /opt/GISWxprintglue/man +# undef XPrintDir +# define XPrintDir /opt/GISWxprintglue/server/etc/XpConfig + /* PCL DDXs are currently defunct in Solaris Xprt, so do not ship the + * config files for now */ +# undef XpColorPclDDX +# define XpColorPclDDX NO +# undef XpMonoPclDDX +# define XpMonoPclDDX NO + /* GISWxprintglue uses the Solaris Xprt server which uses the Solaris + * encoding/ttmap files for font encodings + */ +# define InstallXF86EncodingFiles NO +#endif /* BuildGISWxprintglue */ + +XCOMM Some build hacks for the GISWxprint package +#if BuildGISWxprint +# define ProjectRoot /usr/openwin +# define ServerConfigDir /usr/openwin/server/etc +# define BinDir /opt/GISWxprint/bin +# define ManDirectoryRoot /opt/GISWxprint/man +# undef XPrintDir +# define XPrintDir /opt/GISWxprint/server/etc/XpConfig + /* PCL DDXs are currently defunct in Solaris Xprt, so do not ship the + * config files for now */ +# undef XpColorPclDDX +# define XpColorPclDDX NO +# undef XpMonoPclDDX +# define XpMonoPclDDX NO + /* Make sure we install our own encoding files since Solaris uses a format we + * (currently) do not support (yet). + */ +# define InstallXF86EncodingFiles YES +# undef XF86EncodingsPath +# define XF86EncodingsPath /opt/GISWxprint/lib/X11/fonts/encodings +#endif /* GISWxprint */ + +/* Install XF86 encoding files since that's the only format we currently support */ +#ifndef InstallXF86EncodingFiles +#define InstallXF86EncodingFiles YES +#endif /* InstallXF86EncodingFiles */ + +#define HasVarDirectory NO +#undef HasMotif2 +#define HasMotif2 YES + +#if 1 /* Switch for 32bit binaries or 64bit binaries */ + /* 32bit SPARC */ +# define CcCmd /opt/SUNWspro/bin/cc +# define CplusplusCmd /opt/SUNWspro/bin/CC +#else + /* 64bit sparc (Doesn't really work yet because the Xservers cannot link properly... ;-( */ +# define ServerExtraDefines -D_XSERVER64 +# define CcCmd /opt/SUNWspro/bin/cc -xarch=v9a +# define CplusplusCmd /opt/SUNWspro/bin/CC -xarch=v9a +# define UsrLibDir /usr/openwin/lib/sparcv9 +#endif + +#if 0 /* Development only */ + XCOMM Explicitly use "-xs" to make Rational Purify "happy" +# undef OptimizedCDebugFlags +# define OptimizedCDebugFlags -xs -g -DDEBUG_$(LOGNAME) +#endif + +XCOMM #### FreeBSD-specifc stuff ... #### +#elif defined(FreeBSDArchitecture) +#define ProjectRoot /usr/X11R6 +#define XPrintDir /etc/X11/xserver +#define DlLibrary -lc +#undef XF86SVGAServer +#define XF86SVGAServer NO +#define HasVarDirectory NO +#define HasMotif2 YES +#define HasGhostScript YES +#define InstallXF86EncodingFiles NO + +XCOMM #### NetBSD-specifc stuff ... #### +#elif defined(NetBSDArchitecture) +#define ProjectRoot /usr/X11R6 +#define XPrintDir /etc/X11/xserver +#undef XF86SVGAServer +#define XF86SVGAServer NO +#define HasVarDirectory NO +#define HasMotif2 YES +#define HasGhostScript YES +#define InstallXF86EncodingFiles NO + +XCOMM #### Linux-specifc stuff ... #### +#elif defined(LinuxArchitecture) +#define ProjectRoot /usr/X11R6 +#define XPrintDir /etc/X11/xserver +#undef XF86SVGAServer +#define XF86SVGAServer NO +#define HasVarDirectory NO +#define HasMotif2 YES +#define HasGhostScript YES +#define InstallXF86EncodingFiles NO +/* Debian Xprint package puts the Xprt config files elsewhere */ +#if (LinuxDistribution == LinuxDebian) +# define XPrintDir /usr/share/Xprint/xserver +#endif + +#endif + +/* Do not strip binaries to ensure usefull stacktraces in bug reports + * (http://xprint.mozdev.org/bugs/show_bug.cgi?id=2264) + */ +#define StripInstalledPrograms NO + +/* Does the X11 installation have the Xfree86 encoding files ? */ +#ifndef InstallXF86EncodingFiles +#define InstallXF86EncodingFiles YES +#endif /* InstallXF86EncodingFiles */ + +INSTALLXF86ENCODINGFILES = InstallXF86EncodingFiles + +#ifndef XF86EncodingsPath +#define XF86EncodingsPath $(FONTDIR)/encodings +#endif /* XF86EncodingsPath * + +/* ######################################################################### + * ################ xprint.mozdev.org defaults end ################ + * ######################################################################### + */ Index: xc/config/docbook/docbookconv.sh =================================================================== RCS file: xc/config/docbook/docbookconv.sh diff -N xc/config/docbook/docbookconv.sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/config/docbook/docbookconv.sh 21 Apr 2004 09:33:47 -0000 @@ -0,0 +1,115 @@ +#!/bin/sh + +fatal_error() +{ + echo "$1" 1>&2 + exit 1 +} + +debug_echo() +{ + echo "$1" 1>&2 +} + +verbose_echo() +{ + echo "$1" 1>&2 +} + +which_tool() +{ + echo "${PATH}" | tr ":" "\n" | while read i ; + do ls -1ad "${i}/${1}" 2>/dev/null ; done | sort | uniq +} + +which_program() +{ + echo "${1}" | tr ":" "\n" | while read i ; + do + which_tool "${i}" + done | sort | uniq +} + +which_xsl() +{ + ls -1ad ${1}/docbook-xsl-stylesheets*/ 2>/dev/null | head -1 +} + +# Fix HTML generated by the DocBook XSL stylesheets +# In many cases is used instead of

, screwing-up +# display (this stuff only works for XHTML) +fix_docbook_html() +{ + sed "s//

/g;s/<\/ns[0-9]*:p>/<\/p>/g" +} + +# main +infile="${1}" +outputformat="${2}" +outputfile="${3}" + +# xsl processing +case "`uname -s`" in + FreeBSD) + PATH="${PATH}:/usr/local/bin:/usr/local/sbin" + export PATH + stylesheetbase="/usr/local/share/xsl/" + ;; + *) + stylesheetbase="/usr/share/sgml/docbook/" + ;; +esac +xsltproc="`which_tool xsltproc`" +stylesheetdir="`which_xsl ${stylesheetbase}`" +docbook2man="`which_tool docbook2man`" +verbose_echo "# Using xsltproc=${xsltproc}." +verbose_echo "# Using stylesheetdir=${stylesheetdir}." +verbose_echo "# Using docbook2man=${docbook2man}." + +# Prechecks +[ "${infile}" = "" ] && fatal_error "$0: No input file." +[ "${outputfile}" = "" ] && fatal_error "$0: No output file." +[ "${outputformat}" = "" ] && fatal_error "$0: No format given." +[ ! -r "${infile}" ] && fatal_error "$0: Input file not found or readable." +[ ! -x "${xsltproc}" ] && fatal_error "$0: No xsltproc found." +[ ! -r "${stylesheetdir}" ] && fatal_error "$0: No DocBook/XSL style sheets found." +[ ! -x "${docbook2man}" ] && fatal_error "$0: No docbook2man found." + + +# this is hack style to work around the problem that "docbook2man" +# writes lots of files into the current dir +MYTMPDIR="/tmp/docbookconv_${RANDOM}" +MYCURRDIR="${PWD}" + +( + mkdir "${MYTMPDIR}" + cd "${MYTMPDIR}" + + case "${outputformat}" in + "html") + cp "${MYCURRDIR}/${infile}" "${infile}.tmp" + if [ "${infile}" != "${infile%.sgml}" ] ; then + verbose_echo "# processing as SGML document" + ${xsltproc} --docbook ${stylesheetdir}/html/docbook.xsl "${infile}.tmp" | fix_docbook_html >"${MYCURRDIR}/${outputfile}" + else + verbose_echo "# processing as XML document" + ${xsltproc} ${stylesheetdir}/html/docbook.xsl "${infile}.tmp" | fix_docbook_html >"${MYCURRDIR}/${outputfile}" + fi + ;; + "man") + cp "${MYCURRDIR}/${infile}" "${infile}.tmp" + ${docbook2man} "${infile}.tmp" + manfile="$(ls -1 ${infile%.*}.__*)" + + verbose_echo "manfile=${manfile}" + [ ! -r "${manfile}" ] && fatal_error "$0: manfile not found." + cp "${manfile}" "${MYCURRDIR}/${outputfile}" + ;; + *) + fatal_error "Unsupported output format ${outputformat}." + ;; + esac +) + +# EOF. + Index: xc/doc/hardcopy/Imakefile =================================================================== RCS file: /cvs/xorg/xc/doc/hardcopy/Imakefile,v retrieving revision 1.1.4.1 diff -u -r1.1.4.1 Imakefile --- a/xc/doc/hardcopy/Imakefile 5 Mar 2004 13:38:14 -0000 1.1.4.1 +++ b/xc/doc/hardcopy/Imakefile 21 Apr 2004 09:33:48 -0000 @@ -1,15 +1,13 @@ XCOMM $XFree86: xc/doc/specs/Imakefile,v 1.3 2000/03/02 17:52:57 dawes Exp $ -#if defined(HardcopyDocDirs) +HARDCOPYDOCDIRS = HardcopyDocDirs #define IHaveSubdirs #define PassCDebugFlags -SUBDIRS = HardcopyDocDirs +SUBDIRS = $(HARDCOPYDOCDIRS) XPRINT all:: MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) - -#endif Index: xc/doc/hardcopy/XPRINT/Imakefile =================================================================== RCS file: /cvs/xorg/xc/doc/hardcopy/XPRINT/Imakefile,v retrieving revision 1.1.4.1 diff -u -r1.1.4.1 Imakefile --- a/xc/doc/hardcopy/XPRINT/Imakefile 5 Mar 2004 13:38:15 -0000 1.1.4.1 +++ b/xc/doc/hardcopy/XPRINT/Imakefile 21 Apr 2004 09:33:48 -0000 @@ -1,5 +1,10 @@ -XCOMM $XFree86$ -InstallHardcopyDoc(xp_library,xp_library.PS.gz) -InstallHardcopyDoc(xp_proto,xp_proto.PS.gz) +#ifdef HasDocBookTools +all:: Xprint_FAQ.html Xprint_FAQ.txt + +ConvertDocBookToHTML(Xprint_FAQ.xml, Xprint_FAQ.html) + +Xprint_FAQ.txt: Xprint_FAQ.html + lynx -dump Xprint_FAQ.html | fgrep -v "file://localhost/" >Xprint_FAQ.txt +#endif /* HasDocBookTools */ Index: xc/doc/hardcopy/XPRINT/Xprint_FAQ.html =================================================================== RCS file: xc/doc/hardcopy/XPRINT/Xprint_FAQ.html diff -N xc/doc/hardcopy/XPRINT/Xprint_FAQ.html --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/doc/hardcopy/XPRINT/Xprint_FAQ.html 21 Apr 2004 09:33:50 -0000 @@ -0,0 +1,3080 @@ +Xprint Frequently Asked Questions

Xprint Frequently Asked Questions


About this FAQ

+ Archive-name: Xprint/FAQ +

+ Version: 0.9 +

+ Last-Modified: 2004/02/16 04:15:16 +

+ Maintained-by: + Roland Mainz + +

+ The following is a list of questions that are frequently asked about + Xprint. +

+ You can help make it an even better-quality FAQ by writing a short + contribution or update and sending it BY EMAIL ONLY to me. + A contribution should consist of a question and an answer, and increasing + number of people sends me contributions of the form "I don't know the + answer to this, but it must be a FAQ, please answer it for me". Please + read the FAQ first (including the item "Getting Help") + and then feel free to ask me if it is not in the FAQ. +

+ Thanks! +

+ The latest Xprint FAQ and some other goodies can be obtained through http from + + http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/doc/hardcopy/XPRINT/Xprint_FAQ.html + + or + + http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/doc/hardcopy/XPRINT/Xprint_FAQ.txt + + (the DocBook/XML master source file is + + http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/doc/hardcopy/XPRINT/Xprint_FAQ.xml + ). +

+

Note

+ Note that the FAQ has not been finished yet (nor is it half-finished...), + many items marked with "XXX" as the answer have still to be written (or have + to be copy&pasted from my item collection... :) +

+

Frequently Asked Questions with Answers

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 ? +
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 ? +
3. Configuration
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 ? +
4. Troubleshooting
Q: + Xprt refuses to start with the message "sh: lpc: command not found" on + my Linux machine. What does that mean ? +
Q: + When the application (=client side) tries to connect to the Xprt + (Xserver) side it fails with a + +Xlib: connection to "meridian:52.0" refused by server +Xlib: Client is not authorized to connect to Server + + What does that mean ? +
Q: + Xprt refuses to start with the message "failed to set default font path + '...' Fatal server error: could not open default font 'fixed'". + What does that mean ? +
Q: + Just copying my fonts into a directory and adding the path to my Xprt + command line didn't work - I always get "Fatal server error: could not + open default font 'fixed'". What am I doing wrong ? +
Q: + Xprt refuses to start with the message "Fatal server error: Cannot + establish any listening sockets - Make sure an X server isn't already + running". What does that mean ? +
Q: + Xprt refuses to start with the message "Fatal server error: Failed to + establish all listening sockets". What does that mean ? +
Q: + Xprt refuses to start with the message "Fatal server error: could not + open default font 'fixed'" or "Fatal server error: could not open default + cursor font 'cursor'". +
Q: + Xprt refuses to start with the message "Fatal server error: no screens + found". What does that mean ? +
Q: + "Printing itself works but the printout covers only 1/4 of the paper - what am I doing wrong ?" +
Q: + "Printing works but I get large borders/margins..." / "[Top] margin is too small" / + "Margins are wrong" / etc. +
Q: + Xprt prints a warning like "Xp Extension: could not find config dir + /usr/X11R6/lib/X11/C/print" - what does that mean ? +
Q: + Xprt crashes with "Fatal server error: Beziers this big not yet supported" + What does that mean ? +
Q: + "My PS Type1 font does not work with my Xserver - how can I fix this ?" +
Q: + I can't get it working. I have set ${DISPLAY} correctly to point to the + Xprt display and... ... What is going wrong ? +
Q: + When I try to print via Xprint I get the message "Fatal server error: + unable to exec '/usr/bin/lp'". What is going wrong here ? +
Q: + The Solaris Xprt prints some error messages about PostScript fonts like + "FOOBAR not found, using Courier. CMEX0123 not found, using Courier." + etc. and uses "Courier" instead of these fonts... +
Q: + "Xprt refused to start, complaining about a missing dir + (/etc/X11/xserver/C/print/ directory)... I created it by hand (empty) and + started Xprt but it still does not work properly..." +
Q: + My Linux system already shipps with a '/usr/X11R6/bin/Xprt'-binary. + Do I need the binary distribution from http://xprint.mozdev.org/ ? +
Q: + I am getting the error message "error opening security policy file + /usr/X11R6/lib/X11/xserver/SecurityPolicy". What does that mean ? +
Q: + I have modified the "HPLJ4family" [or "HPDJ1600C" etc.] printer model to + work with my PostScript printer, but when I print I get empty places + where some text should be - what am I doing wrong here ? +
Q: + Xprt outputs warning messages like: + + +Xp Extension: Can't load driver XP-PCL-MONO + init function missing +Xp Extension: Can't load driver XP-RASTER + init function missing + + + What does that mean ? +
Q: + Printing on Solaris with Mozilla/Eclipse [or any other Xprint client] + removes spaces between words. What is going wrong ? +
Q: + Installation of the "GISWxprint" / "GISWxprintglue" packages fails like this: +# pkgadd -d /space/staging/xprint/GISWxprint.pkg +pkgadd: ERROR: no packages were found in </var/tmp/dstreAAA5Jayyz> + Any idea what I am doing wrong ? +
Q: + Printing page results in [two/three/.../16] leading blank pages, followed by a correct (but offset) page. + Any idea what is going wrong ? +
5. Software development
Q: + How does the X print server (Xprt) and the Xlib client side differ + from the "normal" video Xserver/video client side ? +
Q: + How can I get the printable area (e.g. the portion of the page on which + the printer is physically capable of placing ink) of the paper after I + have chosen a paper ? +
Q: + Do "offscreen" pixmaps work on Xprt ? +
Q: + How can I get the DPI value for the current Xprt server ? Can I use the + values from "xdpyinfo" ? +
Q: + Why does Xprt not offer the MIT-SHM protocol extension ? +
Q: + Does Xprint/Xprt support font rotation ? +
Q: + When I render something on my window and call XpStartPage all the + rendered stuff is gone, I only get a white, empty paper. + What is going wrong here ? +
Q: + What is XpStartDoc for ? +
Q: + How does the XLFD for printer-builtin fonts look like ? / How can I find/identify printer-builtin fonts ? +
Q: + How can I scale images using the Xprint API ? +
Q: + Can I pass my own PostScript code (fragment) to the print spooler instead of letting + Xprt's PostScript DDX generate it ? +
Q: + When I use XpPutDocumentData I get a + BadValue X protocol error. Any idea what am I doing wrong ? +
Q: + How do I use the XprintUtil library ? +
Q: + Why does the XGetImage not work for Xprt ? +
Q: + How to print with Xt/Athena widgets ? +
Q: + How to print with Xt/Motif widgets ? +
Q: + What are the differences between normal display and Xprint display ? +
Q: + How do I scale images ? +
Q: + libXp Image scaling vs. max. request size ? +
Q: + How can I use XprintUtils ? +
Q: + How do I calculate the DPI values for Xprt DDX screens ? +
Q: + How do I find scaleable fonts ? +
Q: + How do I find printer-builtin fonts ? +
Q: + The XLFD for Printer-builtin fonts look like bitmap fonts - is that bad ? +
Q: + When printing using the XawPrintShell/XmPrintShell print shells my PostScript output + is always corrupt. What am I doing wrong ? +
Q: + When printing using the XawPrintShell/XmPrintShell + print shells I always get a grey/dithered background on paper. + Any idea how to change that to "white" ? +
Q: + Are there any caveats/suggestions when printing via Xt/Motif2 widgets ? +
Q: + Can I change the paper size/resolution/page orientation/etc. when printing using the + XawPrintShell/XmPrintShell print shells ? +

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:

+ 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:

+ “ + 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: +

  1. + X to native Postscript +

  2. + X to native PCL5 +

  3. + X to native PCL3 +

  4. + 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 PostScipt Type1 fonts. However this + is the fallback - the last option used by Xprt. Used if + everything else fails. + But when someone does not pass any 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... +

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:

+

  • + On Unix/Linux (general): +

    • + GhostScript ("gs") and GhostView ("gv" and it's KDE- and Gnome-specific versions "kghostview" and "ggv") +

    +

+

  • + Solaris: +

    • + /usr/dt/bin/sdtimage (DPS-based image viewer for CDE) +

    • + /usr/openwin/bin/pageview (DPS-based image viewer for OpenWindows) +

    +

+

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: +

  1. + Printer-builtin fonts (defined by the fonts/-dir in the model-config) +

  2. + PostScript fonts (will be downloaded via generated print job) +

  3. + GFX-fonts build from X11 scaleable fonts +

  4. + GFX-fonts build from X11 bitmap fonts +

+

Q:

+ How can I print TrueType fonts with Xprint ? +

A:

+

  1. + 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. +

  2. + Sun's Xprt on Solaris (/usr/openwin/bin/Xprt) has TrueType font + support out-of-the-box and does not require any special actions. +

  3. + 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. +

  4. + 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 (full framework incl. special widgets like XmPrintShell) +

  • + Common Desktop Environment (CDE) 2.x +

  • + Mozilla +

  • + Eclipse +

  • + KDE/Qt support is comming is planned for the end of Dec/2003 +

  • + 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 the X11 API used by + many applications (mozdev.org is just + hosting the development area, but this does not mean the project is limited to mozilla... + :)). +

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 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.
+

+

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: +

  1. + 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. +

  2. + The env variable ${XPRINTER} defines the default printer used by print + applications. The syntax is either <printername> or + <printername>@<display> + +

    Examples:

    1. +

      +  % export XPRINTER=ps003
      +

      + tells an application to look for the first printer named "ps003" on + all Xprt servers. +

    2. +

      +  % 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 start Xprt ? +

A:

+

  1. + 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... +

  2. + 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... +

    1. + 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... +

    2. + 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). +

  3. + 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. +

    +

  4. + 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. +

    +

  5. + 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
    +        comment=
    +        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 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 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: +

  1. + Adding/modifying the following line to/in + ${XPCONFIGDIR}/C/print/attributes/document sets the default plex for + all printers to "duplex": +

    +  *plex: duplex
    +

    +

  2. + 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: +

  1. + 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
    +

    +

  2. + 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: +

  1. + 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
    +

    +

  2. + 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: +

  1. + Adding/modifying the following line to/in + ${XPCONFIGDIR}/C/print/attributes/document sets the default + orientation for all printers to "portrait": +

    +  *content-orientation: portrait
    +

    +

  2. + 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:

  1. + Create a new directory: +

    +% mkdir Xp_dummyfonts
    +% cd Xp_dummyfonts
    +

    +

  2. + 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.
    +

    +

  3. + 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
    +

    +

  4. + Verify: The directory should now look like this: +

    +% ls -1
    +6x13.pcf.Z
    +cursor.pcf.Z
    +fonts.alias
    +fonts.dir
    +

    +

  5. + 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: +

  • + Adobe: + +

    +

  • + Solaris shipps with various PS Type 1 fonts: +

    • + Arabic: + /usr/openwin/lib/locale/ar/X11/fonts/Type1/ + (fonts.dir and fonts.scale missing, maybe they miss the + presentation forms a&b, too [unconfirmed]) +

    • + ISO-8859-13 (Latin 8): + /usr/openwin/lib/locale/iso_8859_13/X11/fonts/Type1/ +

    • + ISO-8859-5 (Latin 5): + /usr/openwin/lib/locale/iso_8859_9/X11/fonts/Type1/ +

    • + ISO-8859-8/Hebrew: + /usr/openwin/lib/locale/iso_8859_8/X11/fonts/Type1 + (BROKEN, even "type1fix" cannot fix them. Use the hebrew fonts from + + + broken-link-/PS_Type1_iso8859-8.tar.gz) +

    • + ISO-8859-7/Modern greek: + /usr/openwin/lib/locale/iso_8859_7/X11/fonts/Type1/ +

    • + ISO-8859-5/Cryrillic: + /usr/openwin/lib/locale/iso_8859_5/X11/fonts/Type1/ +

    • + ISO-8859-4 (Latin 4): + /usr/openwin/lib/locale/iso_8859_4/X11/fonts/Type1/ +

    • + ISO-8859-2 (Latin 2): + /usr/openwin/lib/locale/iso_8859_2/X11/fonts/Type1/ +

    • + ISO-8859-1 (Latin 1) and Symbol fonts: + /usr/openwin/lib/X11/fonts/Type1/ +

    +

+

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/cgi-bin/bugzilla/enter_bug.cgi?product=xprint&component=Server%3A+Config%3A+model-configs + (e.g. http://xprint.freedesktop.org/cgi-bin/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/attributes/*", + "${XPCONFIGDIR}/${LANG}/print/models/*/model-config") +

  • + "Xprinters" (list of printers): + If there is a locale-specific ${XPCONFIGDIR}/${LANG}/Xprinters present + it will be used instead of ${XPCONFIGDIR}/C/Xprinters (e.g. values set + in ${XPCONFIGDIR}/C/Xprinters will be ignored and the values from + ${XPCONFIGDIR}/${LANG}/Xprinters will be used instead). +

  • + Xprt will determinate the locale which should be used based on the + ${LANG}-environment vaiable at startup time. If there is no such + variable set at that time LANG="C" is assumed. +

    Note:

    + Attribute values for paper names and orientation names refer to + builtin strings in the DDX code (which are itself based on + international standards), these cannot be changed to your own + "inventions" (it does it make sense to try to "localize" paper names - + "ISO-A4" is "ISO-A4" even in japanese/hebrew/german etc.). + Locale-spefific attribute pools can set their own, different values - + but only within the allowed range of values supported by the DDX and + printers's model-config. +

    +

+

Q:

+ Can I execute my own scripts to process the PostScript files generated + by Xprt ? +

A:

+ Yes, there are at least two possible solutions: +

  1. + Create your own model-config which uses a custom "xp-spooler-command" + value - the xprint.mozdev.org's + "PSspooldir" model config (see + "${XPCONFIGDIR}/C/print/models/PSspooldir/" and + "${XPCONFIGDIR}/C/print/attributes/printer" and + "${XPCONFIGDIR}/C/print/Xprinters") + and + "PS2PDFspooldir-GS" model config (see + "${XPCONFIGDIR}/C/print/models/PS2PDFspooldir-GS/" and + "${XPCONFIGDIR}/C/print/attributes/printer" and + "${XPCONFIGDIR}/C/print/Xprinters") + are good examples for that. +

  2. + Use an existing "model-config" (which would normally send it's data to + a printer using the default print spooler command) and provide a + custom "xp-spooler-command". +

    Procedure 2.  + Example (using "SPSPARC2" as printer model, /w/xp_conv + as the script to execute and "myscriptprinter" as name of the printer): +

    1. + Edit ${XPCONFIGDIR}/C/print/attributes/printer and add these lines + (Xprt will replace "%printer-name%" with the printer's name, + "%copy-count%" with the number of job copies, "%job-name%" with the + job's title and "%options%" with any custom spooler options): +

      +myscriptprinter.xp-model-identifier: SPSPARC2
      +myscriptprinter.xp-spooler-command: /w/xp_conv -p %printer-name% -c %copy-count% -t %job-name% -o "%options%"
      +

      +

    2. + Edit ${XPCONFIGDIR}/C/print/Xprinters and append this line: +

      +Printer myscriptprinter
      +

      +

    + +

+

Q:

+ How can I disable "xp_ps_spooldir_tmp_Xprintjobs" / "xp_pdf_spooldir_tmp_Xprintjobs" printer targets ? +

A:

+ Edit ${XPCONFIGDIR}/C/print/Xprinters and + remove or comment-out (using '#') the lines "Printer xp_ps_spooldir_tmp_Xprintjobs" + and "Printer xp_pdf_spooldir_tmp_Xprintjobs". + +

Note:

+ Note that Xprt will NOT start if this printer has been removed/disabled + and no other print queue is available (e.g. if "xp_ps_spooldir_tmp_Xprintjobs" + and "Printer xp_pdf_spooldir_tmp_Xprintjobs" are the only printer target available). +

+

4. Troubleshooting

Q: + Xprt refuses to start with the message "sh: lpc: command not found" on + my Linux machine. What does that mean ? +
Q: + When the application (=client side) tries to connect to the Xprt + (Xserver) side it fails with a + +Xlib: connection to "meridian:52.0" refused by server +Xlib: Client is not authorized to connect to Server + + What does that mean ? +
Q: + Xprt refuses to start with the message "failed to set default font path + '...' Fatal server error: could not open default font 'fixed'". + What does that mean ? +
Q: + Just copying my fonts into a directory and adding the path to my Xprt + command line didn't work - I always get "Fatal server error: could not + open default font 'fixed'". What am I doing wrong ? +
Q: + Xprt refuses to start with the message "Fatal server error: Cannot + establish any listening sockets - Make sure an X server isn't already + running". What does that mean ? +
Q: + Xprt refuses to start with the message "Fatal server error: Failed to + establish all listening sockets". What does that mean ? +
Q: + Xprt refuses to start with the message "Fatal server error: could not + open default font 'fixed'" or "Fatal server error: could not open default + cursor font 'cursor'". +
Q: + Xprt refuses to start with the message "Fatal server error: no screens + found". What does that mean ? +
Q: + "Printing itself works but the printout covers only 1/4 of the paper - what am I doing wrong ?" +
Q: + "Printing works but I get large borders/margins..." / "[Top] margin is too small" / + "Margins are wrong" / etc. +
Q: + Xprt prints a warning like "Xp Extension: could not find config dir + /usr/X11R6/lib/X11/C/print" - what does that mean ? +
Q: + Xprt crashes with "Fatal server error: Beziers this big not yet supported" + What does that mean ? +
Q: + "My PS Type1 font does not work with my Xserver - how can I fix this ?" +
Q: + I can't get it working. I have set ${DISPLAY} correctly to point to the + Xprt display and... ... What is going wrong ? +
Q: + When I try to print via Xprint I get the message "Fatal server error: + unable to exec '/usr/bin/lp'". What is going wrong here ? +
Q: + The Solaris Xprt prints some error messages about PostScript fonts like + "FOOBAR not found, using Courier. CMEX0123 not found, using Courier." + etc. and uses "Courier" instead of these fonts... +
Q: + "Xprt refused to start, complaining about a missing dir + (/etc/X11/xserver/C/print/ directory)... I created it by hand (empty) and + started Xprt but it still does not work properly..." +
Q: + My Linux system already shipps with a '/usr/X11R6/bin/Xprt'-binary. + Do I need the binary distribution from http://xprint.mozdev.org/ ? +
Q: + I am getting the error message "error opening security policy file + /usr/X11R6/lib/X11/xserver/SecurityPolicy". What does that mean ? +
Q: + I have modified the "HPLJ4family" [or "HPDJ1600C" etc.] printer model to + work with my PostScript printer, but when I print I get empty places + where some text should be - what am I doing wrong here ? +
Q: + Xprt outputs warning messages like: + + +Xp Extension: Can't load driver XP-PCL-MONO + init function missing +Xp Extension: Can't load driver XP-RASTER + init function missing + + + What does that mean ? +
Q: + Printing on Solaris with Mozilla/Eclipse [or any other Xprint client] + removes spaces between words. What is going wrong ? +
Q: + Installation of the "GISWxprint" / "GISWxprintglue" packages fails like this: +# pkgadd -d /space/staging/xprint/GISWxprint.pkg +pkgadd: ERROR: no packages were found in </var/tmp/dstreAAA5Jayyz> + Any idea what I am doing wrong ? +
Q: + Printing page results in [two/three/.../16] leading blank pages, followed by a correct (but offset) page. + Any idea what is going wrong ? +
Q:

+ Xprt refuses to start with the message "sh: lpc: command not found" on + my Linux machine. What does that mean ? +

A:

+ Some versions of Xprt look up printer queues using "lpc" on Linux. + In this case "lpc" cannot be found for some reason. + Solution: + Find the place where "lpc" is installed on your machine (some + distributions put it into /usr/sbin, some into /usr/bin/) and check + whether your PATH env var includes this directory. + Example (if "lpc" is located in /usr/sbin/): +

+  % which lpc
+  /usr/sbin/lpc
+  % export PATH=$PATH:/usr/sbin
+  # Start Xprt ...
+  % Xprt <your-options-come-here>
+

+

Q:

+ When the application (=client side) tries to connect to the Xprt + (Xserver) side it fails with a +

+Xlib: connection to "meridian:52.0" refused by server
+Xlib: Client is not authorized to connect to Server
+

+ What does that mean ? +

A:

+ X11 implements access control. You can have host-based, cookie-based (a + "cookie" is used like a passport) or user-based (SecureRPC or Kerberos5) + authentification. Xsecurity(7) + has most of the details. +

  1. + No access control: + .  + If you do not want to use access control for Xprt then you can start it + with the option "-ac" (see Xserver(1x)) + to disable the access control. + Example: +

    +  % Xprt -ac -audit 4 :12
    +

    + will start Xprt with access control disabled and with auditing enabled + (e.g. the "-audit 4" option). +

    + WARNING +

    + Disabling the access control will enable everyone who can + access Xprt to print on your printers (that's why the above example + shows how to use auditing, too - that you can see who does something + with Xprt...) !! +

    +

  2. + Host-based access control: + .  + Host-based access control can be archived using /etc/X<dpy>.hosts + (<dpy> == display number, e.g. /etc/X0.hosts for display 0 (see + Xserver(1x) + manual page for further details)). +

    Procedure 3. Example

    1. + Add the following line to `/etc/X12.hosts' (assuming you want that + the hosts 'merkur' and 'mars' should be able to access the Xprt + server running as display 12 on your host 'neptun'): +

      +INET:merkur
      +INET:mars
      +

      +

    2. + Start Xprt +

    3. + Verify that Xprt is correctly configured: +

      +% export DISPLAY=neptun:12
      +% xhost
      +access control enabled, only authorized clients can connect
      +INET:localhost
      +LOCAL:
      +INET:merkur
      +INET:mars
      +

      +

    +

+

Q:

+ Xprt refuses to start with the message "failed to set default font path + '...' Fatal server error: could not open default font 'fixed'". + What does that mean ? +

A:

+ This means one or more components in the font path (set via the option + "-fp") are either... +

  • + ... not valid +

  • + ... contain fonts not supported by this Xserver (e.g. support has not + be compiled "in" (usually happens for TrueType (which are only support for Solaris version + of Xprt and xprint.mozdev.org releases ≥ 008), OpenType (which are only supported by + xprint.mozdev.org releases 009 or higher) or F3 fonts (Sunsoft/F3 fonts are Solaris-specific + and not supported by other vendors (AFAIK)) + when support for these fonts was not enabled at build time)) +

  • + ... no font or font alias in the font path matches the name "fixed" +

  • + ... an entry in fonts.dir or fonts.alias + with the name "fixed" which references a non-existing or non-readable file +

+ +

Q:

+ Just copying my fonts into a directory and adding the path to my Xprt + command line didn't work - I always get "Fatal server error: could not + open default font 'fixed'". What am I doing wrong ? +

A:

+ Every Xserver needs an index file called fonts.dir to tell it which + fonts are available in this directory and which properties these fonts + have. +

+ If you are lucky there may be already a fonts.scale file which can be + used by "mkfontdir" to create the fonts.dir file. + If there is no fonts.scale then you have to create your own + fonts.dir/fonts.scale either by hand or + via tools like "mkfontscale" (works for all types of scaleable fonts), + "type1inst" (for PS Type1 fonts; see + http://packages.debian.org/stable/utils/type1inst.html) + or "ttmkfdir" (for TrueType fonts; see + http://packages.debian.org/stable/x11/ttmkfdir.html). +

Q:

+ Xprt refuses to start with the message "Fatal server error: Cannot + establish any listening sockets - Make sure an X server isn't already + running". What does that mean ? +

A:

+ There is already a Xserver running at the display ID you have specified + to start Xprt (for example your framebuffer Xserver runs at ":0" then + Xprt can't run at the same display display). +

Q:

+ Xprt refuses to start with the message "Fatal server error: Failed to + establish all listening sockets". What does that mean ? +

A:

+ This means that the Xserver could not open one of it's sockets. Check + the permission of /tmp/.X11-pipe and /tmp/.X11-unix (on Solaris a + Xserver must run set-gid "root" to access these directories). + Either fix the permission or start Xprt with the option "-pn". Using this + option requires to access the server always with + <hostname>:<displaynum> (see Xserver(1x) + manual page for the side-effects of this option). +

Q:

+ Xprt refuses to start with the message "Fatal server error: could not + open default font 'fixed'" or "Fatal server error: could not open default + cursor font 'cursor'". +

A:

+ All Xservers at least two fonts as the minimum: One fixed-width font + ("fixed") and one font for the cursor ("cursor"). Be sure that the font + path contains these fonts. + +

Q:

+ Xprt refuses to start with the message "Fatal server error: no screens + found". What does that mean ? +

A:

Cause:  + This means that Xprt could not find any printers. Either there are no + printers installed, "lpstat"/"lpc" could not find any printers or the + configuration does not contain any manual printer configurations + (see Q/A item "Which program is used by default by Xprt to enumerate the + printers on my system" for further details...). +

Solution:  + Two solutions: +

  1. + Using "PSspooldir" model: + .  + Xprt releases from http://xprint.mozdev.org/ provide the "PSspooldir" + model config for such cases. Just edit the "Xprinters" file and add + this line: +

    +Printer xp_ps_spooldir_tmp_Xprintjobs
    +

    + this will add the pre-configured (see + ${XPCONFIGDIR}/C/print/attributes/printer) "xp_ps_spooldir_tmp_Xprintjobs" + printer which will send jobs to the directory "/tmp/Xprintjobs/" + instead to a printer queue. + (This feature was added in the xprint.mozdev.org release 007, see + xprint.mozdev.org bug 2475 ("RFE: Need + model-config which spools print jobs in a predefined directory").) +

  2. + Manual setup (task list): + .  +

    1. + Provide a simple "Xprinters" spec file which contains a dummy + queue. + Example: +

      +# Create "Xprinters_onlydummy" file which turns autolookup of printers
      +# OFF (using "Augment_Printer_List %none%") and provides one dummy
      +# queue called "ps_myscript" instead (using "Printer ps_myscript")
      +% echo "Augment_Printer_List %none%" >Xprinters_onlydummy
      +% echo "Printer ps_myscript"         >>Xprinters_onlydummy
      +

      +

    2. + Edit ${XPCONFIGDIR}/C/print/attributes/printer and add these + two lines: +

      +ps_myscript.xp-model-identifier: PSdefault
      +ps_myscript.xp-spooler-command: /home/sanja/xprint_test/my_xprt_cat_script.sh
      +

      + This means that the printer "ps_myscript" now uses the "PSdefault" + printer model and it will feed the jobs to the script + "/home/sanja/xprint_test/my_xprt_cat_script.sh" (via stdin). + Note that the absolute path is required for "*xp-spooler-command". +

    3. + Start Xprt on display 18, passing the "Xprinters_onlydummy" + using the "-XpFile" option: +

      +% Xprt -XpFile ./Xprinters_onlydummy -pn -ac -audit 4 :18
      +

      +

    +

+

Q:

+ "Printing itself works but the printout covers only 1/4 of the paper - what am I doing wrong ?" +

A:

+ This is usually an indicator for a wrong DPI setting. The default + "PSdefault" model config uses 300 DPI but some printers only support + 600 DPI. +

Workaround:  + Edit ${XPCONFIGDIR}/C/print/attributes/document and replace the line + "*default-printer-resolution: 300" with + "*default-printer-resolution: 600" + (Note that locale-specific settings in + ${XPCONFIGDIR}/${LANG}/print/attributes/document always override values + set in ${XPCONFIGDIR}/C/print/attributes/document.) +

Solution:  + Create a model-config for your printer which only contains attributes + supported by your printer ("printer-resolutions-supported" is the + attribute in the "model-config" which holds the space-seperated list + of DPI values which are supported by the printer). +

Q:

+ "Printing works but I get large borders/margins..." / "[Top] margin is too small" / + "Margins are wrong" / etc. +

A:

+ Two possible causes: +

  • + Usually same issue as "Printing itself works but the printout covers + only 1/4 of the page"-issue: Wrong DPI. + Solution: Check the DPI value and adjust it as described in the FAQ item + above. Common DPI values for the PostScript DDX are 240, 300, 360, 400 + and 600 DPI. +

  • + You are trying to print "US-letter" on a "DIN-A4" paper or "DIN-A4" on + "US-letter". +

    + Solution: Check your paper settings +

    + Note that the default papersize for Xprt depends on the locale + (e.g. on the env var ${LANG}) Xprt is running in - "en_US"&co. get + US-letter, all others use DIN-A4 (incl. german/austrian etc. locales)). + Exception from this rule: If the selected printer does not support the + default paper size it will set no default paper size for this printer + (then the application side has to make an explicit choice). +

+

Q:

+ Xprt prints a warning like "Xp Extension: could not find config dir + /usr/X11R6/lib/X11/C/print" - what does that mean ? +

A:

+ This is actually the worst case what can happen. + The message indicates that Xprt was unable to find it's configuration + data. +

Solution:  + Two solutions are possible: +

  • + Install the configuration data at the requested location + (/usr/X11R6/lib/X11/C/print/ in this example) +

  • + Set the ${XPCONFIGDIR} env var to the location of the Xprt + configuration directory. +

+

Q:

+ Xprt crashes with "Fatal server error: Beziers this big not yet supported" + What does that mean ? +

A:

+ This is a known issue in the X11R6.5.1 code. In rare cases some PostScript + Type1 fonts can trigger this. + See "My PS Type1 font does not work with my Xserver" ... +

Q:

+ "My PS Type1 font does not work with my Xserver - how can I fix this ?" +

A:

+ Some PS Type1 do not work out-of-the-box with all PS Type1 font engines - + some will work with the Adobe font engine (used in Solaris Xsun) but not + with the X.org font engine (or the other way round) or the fonts are + simply broken. + + The following procedure will try to fix this problem: + Get the "type1fix" perl script the TeXTrace package + (http://www.inf.bme.hu/~pts/textrace-latest.tar.gz) + and run it over the fonts. + + Example 1 (filter fonts): +

+# Broken PFA fonts are in broken_fonts/
+% mkdir fixed_fonts ; cd fixed_fonts
+% for i in ../broken_fonts/*.pfa ; do
+    echo " ------- $i" ;
+    type1fix.pl --ofmt=pfa --infile=$i --outfile=$(basename ${i}) ;
+  done
+

+ + Example 2 (filter fonts and convert them to PFB on-the-fly; do not forget + to update fonts.scale and run "mkfontdir" (to update fonts.dir) ; + systems which use the Adobe font engine (like Solaris/Xsun) may require + to run "makepsres", too): +

+# Broken PFA fonts are in broken_fonts/
+% mkdir fixed_fonts ; cd fixed_fonts
+% for i in ../broken_fonts/*.pfa ; do
+    echo " ------- $i" ;
+    type1fix.pl --ofmt=pfb --infile=$i --outfile=$(basename ${i%.pfa}.pfb) ;
+  done
+

+

Q:

+ I can't get it working. I have set ${DISPLAY} correctly to point to the + Xprt display and... ... What is going wrong ? +

A:

+ Do not set ${DISPLAY} to the Xprt server. You still need your normal + Xserver for your video card - Xprt is only for your printer(s). + Applications look up Xprt servers via the ${XPSERVERLIST} env var, NOT + via the ${DISPLAY} env var. +

Q:

+ When I try to print via Xprint I get the message "Fatal server error: + unable to exec '/usr/bin/lp'". What is going wrong here ? +

A:

+ This usually means that the spooler application "/usr/bin/lp" + could not be launched. This is usually the result when + /usr/bin/lp does not exist or + cannot be executed (for example, shell scripts without the +x (executable) flag etc.). +

Q:

+ The Solaris Xprt prints some error messages about PostScript fonts like + "FOOBAR not found, using Courier. CMEX0123 not found, using Courier." + etc. and uses "Courier" instead of these fonts... +

A:

Cause:  + The Solaris (Adobe-based) PostScript font engine requires a "PostScript + resource database" file named "PSres.upr" to use the PostScript fonts + correctly. +

Solution:  + Create the missing PSres.upr database. +

Procedure 5. Steps to create the missing "PSres.upr" file (task list):

  1. + Go to the location where the matching fonts are installed (we're using + /home/sanja/mathml_fonts/tex_cmps/Type1/ in this example): +

    +% cd /home/sanja/mathml_fonts/tex_cmps/Type1//
    +

    +

  2. + Create "PSres.upr" using the "makepsres" command. +

    +% makepsres
    +

    +

  3. + Validation: + Make sure the file has been created: +

    +% ls -l PSres.upr
    +

    +

  4. + Restart Xprt server(s): +

    +% /etc/init.d/xprint restart
    +

    +

  5. + Restart application which uses these fonts +

+

References:  +

+

Q:

+ "Xprt refused to start, complaining about a missing dir + (/etc/X11/xserver/C/print/ directory)... I created it by hand (empty) and + started Xprt but it still does not work properly..." +

A:

+ Xprt expects some config data in this directory. Just making it an + existing but empty dir will work around the error message but will not + result in a properly working Xprt since it has no (usefull) builtins + which would make it possible to run the binary without the config data. + Your X11 binary distribution should always come with the config data + (for example /usr/openwin/server/etc/XpConfig/ on Solaris) or you will not + be able to use Xprint (however it is possible to copy the config data + from another system :) + BTW: Source for the configs can be found under xc/programs/Xserver/XpConfig/ +

Q:

+ My Linux system already shipps with a '/usr/X11R6/bin/Xprt'-binary. + Do I need the binary distribution from http://xprint.mozdev.org/ ? +

A:

+ This depends on what is shipped with your Linux distribution. + Please check the "vendor" string of the Xprt server: +

+% Xprt :10 &
+% xdpyinfo -display :10 | grep -i "vendor string"
+

+ If this outputs a line like "vendor string: The XFree86 Project, Inc" + then you have the Xprt binary build from Xfree86 sources - which are + broken - even the newest version [I'll update this as soon as Xfree86 + shipps with a working version]. + Xprt from Solaris, HP-UX and my own builds (which identifies itself as + "vendor string: xprint.mozdev.org" for releases >= 007, older releases + (e.g. <= 006) identify itself as as "vendor string: The X.Org Group") + are known to work proprtly. +

Q:

+ I am getting the error message "error opening security policy file + /usr/X11R6/lib/X11/xserver/SecurityPolicy". What does that mean ? +

A:

+ The policy file for the SECURITY extension cannot be found. + This is not serious unless you want to make use of features of the + SECURITY extensions (like treating clients as "untrusted", e.g. restrict + their access to certain Xserver resources). + Normally the missing policy file is a problem with your Unix/Linux X11 + distribution; consult your vendor where to get the missing file from. + Alternatively you can get the plain X11R6.6 security policy file from + ftp://ftp.x.org/pub/R6.6/xc/programs/Xserver/Xext/SecurityPolicy + (copy it to the matching location - but be sure that you do not overwrite any + existing security policy file). +

Q:

+ I have modified the "HPLJ4family" [or "HPDJ1600C" etc.] printer model to + work with my PostScript printer, but when I print I get empty places + where some text should be - what am I doing wrong here ? +

A:

+ The "HPLJ4family" and "HPDJ1600C" models are PCL-only, check + the model-config spec + (${XPCONFIGDIR}/C/print/models/${MODEL_NAME}/model-config) - if the + "xp-ddx-identifier" attribute says something with "PCL" (like + "XP-PCL-MONO" etc.) in the value string then this model-config is for + the PCL-DDX only (e.g. their PMF fonts do not supply the neccesary + information (e.g. the "_ADOBE_POSTSCRIPT_FONTNAME" chunk is missing; + they only provide the "PCL_FONT_NAME" chunk) nor are these fonts + accessible via the PostScript-support in these printers. + A solution is to use the "PSdefault" model instead (and/or create your + customized own version of this model) - or look if there is a + model-config beginning with the same name and ending with "PS" (e.g. + "HPLJ4family-PS"). +

Q:

+ Xprt outputs warning messages like: +

+
+Xp Extension: Can't load driver XP-PCL-MONO
+              init function missing
+Xp Extension: Can't load driver XP-RASTER
+              init function missing
+
+

+ What does that mean ? +

A:

+ Two possible problems: +

  1. + The requested driver is not supported by that version of Xprt. + For example Solaris 2.7 Xprt does not support XP-PCL-MONO nor the + XP-RASTER driver. + Valid values for the "xp-ddx-identifier" attribute in + ${XPCONFIGDIR}/*/print/attributes/printers and/or + ${XPCONFIGDIR}/*/print/models/*/model-config are +

    • + Solaris 2.7: XP-POSTSCRIPT and XP-PCL-COLOR +

    • + Solaris >=2.8: XP-POSTSCRIPT, XP-PCL-COLOR, XP-PCL-MONO and XP-RASTER +

    • + HP-UX: XP-POSTSCRIPT, XP-PCL-COLOR, XP-PCL-MONO, XP-PCL-LJ3, + XP-PCL-DJ1200 and XP-RASTER +

    • + xprint.mozdev.org release 007: XP-POSTSCRIPT and XP-RASTER +

    • + xprint.mozdev.org release 008: XP-POSTSCRIPT, XP-PCL-COLOR, + XP-PCL-MONO, XP-PCL-LJ3 and XP-RASTER +

    • + xprint.mozdev.org release >=2.0 (planned): XP-POSTSCRIPT, XP-PCL-COLOR, + XP-PCL-MONO, XP-PCL-LJ3, XP-RASTER, XP-PDF and XP-SVGPRINT. +

    +

  2. + There may be too many drivers loaded into one Xprt instance. + By default a single Xserver instance can only handle three screens - and + since one Xprint DDX maps to one Xserver screen this limit applies to + the number of loaded Xprt drivers, too. + Starting with xprint.mozdev.org release 008 the per-Xserver screen limit + was increased from "3" to "8" to avoid this issue... + Workaround: Start a 2nd instance of Xprt which handles the other + drivers which do not fit into the first instance. +

+

Q:

+ Printing on Solaris with Mozilla/Eclipse [or any other Xprint client] + removes spaces between words. What is going wrong ? +

A:

Cause:  + This is a bug in the Solaris Xprint server binary (/usr/openwin/bin/Xprt). + Various bug reports have been filed, see +

+

Solution:  + Solution: + Please apply the following OS patches from http://sunsolve.sun.com/: +

+ +

Note

+ For Solaris 2.7 (both SPARC and x86 platforms) there are currently + no patches available... + ;-( +

+

Known workarounds:  +

  • + Remove the '-monotype-arial-*' fonts from the font path +

  • + Use an alternate Xprint server like available in the "GISWxprint" package + (this package is identical to the "GISWxprintglue" package except that it + uses a Xprint server build from xprint.mozdev.org sources and not the + /usr/openwin/bin/Xprt binary from Solaris) +

  • + Mozilla-only: Adding +

    +  user_pref("print.xprint.font.rejectfontpattern",
    +  "fname=-dt-.*;scalable=.*;outline_scaled=false;xdisplay=.*;xdpy=.*;ydpy=.*;xdevice=.*|" +
    +  "fname=-monotype-arial.*;scalable=.*;outline_scaled=.*;xdisplay=.*;xdpy=.*;ydpy=.*;xdevice=.*");
    +

    + to prefs.js works around the problem (see + bugzilla.mozilla.org bug 199957 comment #6, + too). +

    Note

    + Note that this workaround may render various locales completly + inaccessible for printing since many of them only employ MonoType fonts. +

    +

+

Q:

+ Installation of the "GISWxprint" / "GISWxprintglue" packages fails like this: +

# pkgadd -d /space/staging/xprint/GISWxprint.pkg
+pkgadd: ERROR: no packages were found in </var/tmp/dstreAAA5Jayyz>

+ Any idea what I am doing wrong ? +

A:

+ The target machine misses a patch to cure SunSolve bug 4025718 ("pkginfo: allow greater than nine characters for PKG parameter value"). + Please apply the patches listed in the "Installation Requirements" section in the README + for the GISWxprint / + GISWxprintglue package. +

Q:

+ Printing page results in [two/three/.../16] leading blank pages, followed by a correct (but offset) page. + Any idea what is going wrong ? +

A:

+ This symptom depends on the CUPS GhostScript driver used, however the exact cause is currently unknown + (see comments in SuSE + support database entry SDB-2002/11/jsmeix_print-81-cups-formfeed ("Blank Pages When Printing with + CUPS")). +

Solution:  + Disable the CUPS accounting functionality in the cupsomatic filter by changing the line +

+  my $ps_accounting = 1;
+

+ to +

+  my $ps_accounting = 0;
+

+ in the filter script /usr/lib/cups/filter/cupsomatic as the user root. + If you use /etc/foomatic/filter.conf, disable ps_accounting there. +

References:  +

+

5. Software development

Q: + How does the X print server (Xprt) and the Xlib client side differ + from the "normal" video Xserver/video client side ? +
Q: + How can I get the printable area (e.g. the portion of the page on which + the printer is physically capable of placing ink) of the paper after I + have chosen a paper ? +
Q: + Do "offscreen" pixmaps work on Xprt ? +
Q: + How can I get the DPI value for the current Xprt server ? Can I use the + values from "xdpyinfo" ? +
Q: + Why does Xprt not offer the MIT-SHM protocol extension ? +
Q: + Does Xprint/Xprt support font rotation ? +
Q: + When I render something on my window and call XpStartPage all the + rendered stuff is gone, I only get a white, empty paper. + What is going wrong here ? +
Q: + What is XpStartDoc for ? +
Q: + How does the XLFD for printer-builtin fonts look like ? / How can I find/identify printer-builtin fonts ? +
Q: + How can I scale images using the Xprint API ? +
Q: + Can I pass my own PostScript code (fragment) to the print spooler instead of letting + Xprt's PostScript DDX generate it ? +
Q: + When I use XpPutDocumentData I get a + BadValue X protocol error. Any idea what am I doing wrong ? +
Q: + How do I use the XprintUtil library ? +
Q: + Why does the XGetImage not work for Xprt ? +
Q: + How to print with Xt/Athena widgets ? +
Q: + How to print with Xt/Motif widgets ? +
Q: + What are the differences between normal display and Xprint display ? +
Q: + How do I scale images ? +
Q: + libXp Image scaling vs. max. request size ? +
Q: + How can I use XprintUtils ? +
Q: + How do I calculate the DPI values for Xprt DDX screens ? +
Q: + How do I find scaleable fonts ? +
Q: + How do I find printer-builtin fonts ? +
Q: + The XLFD for Printer-builtin fonts look like bitmap fonts - is that bad ? +
Q: + When printing using the XawPrintShell/XmPrintShell print shells my PostScript output + is always corrupt. What am I doing wrong ? +
Q: + When printing using the XawPrintShell/XmPrintShell + print shells I always get a grey/dithered background on paper. + Any idea how to change that to "white" ? +
Q: + Are there any caveats/suggestions when printing via Xt/Motif2 widgets ? +
Q: + Can I change the paper size/resolution/page orientation/etc. when printing using the + XawPrintShell/XmPrintShell print shells ? +
Q:

+ How does the X print server (Xprt) and the Xlib client side differ + from the "normal" video Xserver/video client side ? +

A:

+ The X Print Service expands on the traditional X-Server and Xlib world + in the following ways: + +

  1. + Most obvious is the use of "print ddx drivers" instead of + "video ddx drivers". While a video ddx driver modifies pixels + in a video frame buffer, a print ddx driver generates "page + description language (PDL)" output (such as PCL, PDF, PostScript, SVGprint, etc.) + or sends the print rendering instructions to a platform-specific + print API (like Win32/GDI). +

    + Once a print ddx driver generates PDL output, it can be sent to + a spooler + (using XpuStartJobToSpooler) + or retrieved by the client (to implement functionality like "print-to-file" + with functions such as XpuStartJobToFile). +

  2. + Since printers support "paged" output, unlike video, a portion + of the Xp Extension supports APIs to delineate printed output + into a print job. +

    + A "print job" in Xprint consists of one or more "documents" which itself + consists of one or more "pages". +

    + A client starts a job sequence with XpStartJob and + ends it with XpEndJob or XpCancelJob to cancel the + generation of the current print job. + Any document-specific print attributes MUST be changed before XpStartJob. +

    + A client starts a document sequence with XpStartDoc and + ends it with XpEndDoc or XpCancelDoc to cancel the + generation of the current document. + Any document-specific print attributes MUST be changed before XpStartDoc + or after XpEndDoc (to affect the following document). +

    + A client starts a page sequence with XpStartPage and + ends it with XpEndPage or XpCancelPage to cancel the + generation of the current page. + Any page-specific print attributes MUST be changed before XpStartDoc + or after XpEndDoc (to affect the following document). +

  3. + Since printers have extensive capabilities, another portion of + the Xp Extension supports APIs to manipulate "print contexts". +

    + Once a printer is selected using the Xp Extension API, a print + context to represent it can be created. A print context + embodies the printer selected - it contains the printer's + default capabilities, selectable range of capabilities, + printer state, and generated output. Some "attributes" within + the print context can be modified by the user, and the + X-Server and print ddx driver will react accordingly. For + example, the attribute "content-orientation" can be set to + "landscape" or "portrait" (if the printer supports these + values - which can be queried using the Xprint API as well). +

  4. + Since printers can have "built in" fonts, the Xp Extension in + the X-Server works with the print ddx drivers to make + available (for printing only) additional fonts on a per print + context basis. +

    + When a print context is created and set for a given printer, + the X font calls may be able to access additional printer + fonts. To do this (typically), the X-Server must have access + to "printer metric files" (.pmf) that describe at minimum the + metrics of the built in fonts. +

  5. + Since printers can have "built in" fonts, the Xp Extension in + the X-Server works with the print ddx drivers to make + available (for printing only) additional fonts on a per print + context basis. +

    + When a print context is created and set for a given printer, + the X rendering calls use the resolution of the current page + (or if not given, the resolution of the current document or + the current resolution for this print job). + The screen's resolution is INVALID in this case. + XprintUtils has the functions XpuGetResolution + (to get the current print resolution (searching page, document and + job level attributes (in that order)), XpuSetPageResolution + (to set the current page resolution), XpuSetDocResolution + (to set the current document resolution), XpuGetResolutionList (to + get the list of all resolutions supported by this printer) and XpuFindResolution + (to find a resolution in the list returned by XpuGetResolutionList) + to support getting/setting/queries of resolutions. +

    + When a print context is created and set for a given printer, + the X image rendering calls (such as XPutImage support + scaling of images. + The Xp Extension API provides the functions XpSetImageResolution + and XpSetImageResolution to set and get an image resolution. + The scaling factor for an image printed on the paper can simply calculated via + + scaling_factor = curr_print_resolution_resolution / image_resolution + where curr_print_resolution_resolution is the value returned by a function such as + XpuGetResolution, image_resolution the resolution passed to + XpSetImageResolution and scaling_factor the resulting scaling factor. + Note that XpSetImageResolution will failure (=FALSE) when the print DDX + (for example the RASTER DDX) does not support scaling. + In that case the application has to scale the image manually. +

+

Q:

+ How can I get the printable area (e.g. the portion of the page on which + the printer is physically capable of placing ink) of the paper after I + have chosen a paper ? +

A:

+ The XpGetPageDimensions function returns the printable area and other information + about the current page geometry. + Note that the page geometry changes when the page attributes such as content-orientation + or default-medium are changed by the application. +

Q:

+ Do "offscreen" pixmaps work on Xprt ? +

A:

+ Yes, "offscreen" pixmaps are working on Xprt. +

Q:

+ How can I get the DPI value for the current Xprt server ? Can I use the + values from "xdpyinfo" ? +

A:

+ The Xprt screen resolution defines only the maximum resolution configured + for the matching DDX, the printers real DPI is obtained via an another + API (XprintUtil has a bunch of functions to get/set the document/page + resolution, see XpuGetResolutionList, XpuFreeResolutionList, + XpuGetResolution, XpuSetPageResolution, + XpuSetDocResolution and XpuFindResolution). +

Q:

+ Why does Xprt not offer the MIT-SHM protocol extension ? +

A:

+ The MIT-SHM protocol extension is partially (XShmPutImage would work, + but others like XShmGetImage and esp. XShmCreatePixmap + cannot be implemented properly) incompatible to the way how some of the Xprint DDX are implemented. + For example the PostScript, PDF, PCL and SVGprint DDX do not rasterize any images on their side - instead they convert the + stream of X11 rendering instructions into the matching PDL instruction stream. + Only the printer side will (finally) do the rasterisation of the output image. This is the basically the same reason why + XGetImage does not work for those DDXs - and + functions such as XShmCreatePixmap would be useless since drawing operations on the shared + pixmap would not be applied to the application (e.g. Xprint client) as well. +

Q:

+ Does Xprint/Xprt support font rotation ? +

A:

+ Yes - Xprint/Xprt supports font rotation at any angle via the matrix XLFD + enhancement (this even works for printer-builtin fonts !!). For details + see the paper "New Font Technology for X11R6" by Nathan Meyers (a copy can be found in the + Xprint.org source tree under xc/doc/hardcopy/XLFD/x11r6_fonts_94_paper.PS.gz) +

+ Short: + The transformation-matrix for rotation can be calculated like this: +

++--                    --+
+| cos(angle)   sin(angle)|
+|                        |
+|-sin(angle)   cos(angle)|
++--                    --+
+

+ Examples: +

  1. + the following code fragment obtains a 180 degree rotated font (matrix [-1 0 0 -1]): +

    +  ... = XLoadQueryFont(..., "-adobe-courier-bold-r-normal--*-[~24 0 0 ~24]-0-0-m-*-iso8859-1");
    +

    +

  2. + the following code fragment obtains a 90 degree rotated font (matrix [0 1 -1 0]): +

    +  ... = XLoadQueryFont(..., "-adobe-courier-bold-r-normal--*-[0 24 ~24 0]-0-0-m-*-iso8859-1");
    +

    +

+

+ Future versions of Xprint will support the STSF + font API which supports matrix transformations as well. +

Q:

+ When I render something on my window and call XpStartPage all the + rendered stuff is gone, I only get a white, empty paper. + What is going wrong here ? +

A:

+ Remember the rule that "only those drawings are printed on the paper which + were rendered between XpStartPage and XpEndPage". + XpStartPage clears the window you passed as argument, e.g. it creates + a new, blank sheet of paper where you can do your rendering stuff on. + XpEndpage then pushes the "paper sheet" to the stash of papers from the + document in process. + +

Tip

+ If you want to render something once for multiple or all pages: + Render on a offscreen pixmap and copy (with XCopyArea) the content to + the "paper" drawable (after calling XpStartPage) - XpStartpage only + affects the window passed as parameter. +

+

Q:

+ What is XpStartDoc for ? +

A:

+ ISO 10175 and some advanced printing systems by IBM and HP had set forth + the standard that a "Job" is made up of one or more "Documents", and + each document is made up of one or more "Pages". Xprint was designed that + in a true ISO 10175 environment/implementation (lp(1) on steroids, and + with an API), Xprt can actually learn about all printers and their + capabilities though API's into the printer subsystem (vs. using config + files), map Job/Doc/Page directly into ISO 10175 equivalents, and use + APIs to view job status and kill jobs (vs. + cancel(1), + lpcancel(1), + lpstatus(1)). + Because most applications of the day are only printing one document per + job, XpStartPage was designed that it generates a "synthetic" + XpStartDoc if it has not been called yet. +

Q:

+ How does the XLFD for printer-builtin fonts look like ? / How can I find/identify printer-builtin fonts ? +

A:

+ There is no special XLFD scheme for printer-builtin fonts. + Instead the xp-listfonts-modes-supported is used to define + whether XListFonts and co. return printer-builtin fonts or not. + By default the attribute looks is set to + *xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts which defines + thaht XListFonts and co. return both printer-builtin and normal fonts. + Removing xp-list-internal-printer-fonts will make printer-builtin fonts disappear, + removing xp-list-glyph-fonts will make normal glyph fonts disappear from font lists. +

Q:

+ How can I scale images using the Xprint API ? +

A:

+ XXX +

Q:

+ Can I pass my own PostScript code (fragment) to the print spooler instead of letting + Xprt's PostScript DDX generate it ? +

A:

+ XXX +

Q:

+ When I use XpPutDocumentData I get a + BadValue X protocol error. Any idea what am I doing wrong ? +

A:

+ XXX + +

Q:

+ How do I use the XprintUtil library ? +

A:

+ XXX +

Q:

+ Why does the XGetImage not work for Xprt ? +

A:

+ There are at least three reasons why XGetImage does not work for Xprt: +

  1. + Most of the Xprt DDX implementations do not render itself on any + bitmaps like the framebuffer(=video) DDX do, they translate the + rendering commands into the matching commands of the printer language + (it is technically possible to implement such support for XGetImage + even for those drivers - but there are more reasons:) +

  2. + Xprt usually operates at high resolutions which results in very large + dimensions. If a client would request the 24bit TrueColor bitmap + data for a whole DIN-A4 page at 2400 DPI a data chunk of ~173 + megabytes would be the response. This would be more or less a + DOS(=Denial of Service) for either the client, the network and/or the + server. +

  3. + The printer-builtin fonts only provide metrics information - there is no real "outline" + information at that time (these fonts reside only in the printer's ROM and are only + available at the time the printer rasterizes the incoming PDL + (e.g. PCL/PostScript) data stream) which could be used to rasterize the matching glyphs + (which means: A XGetImage implementation would return image + data but glyphs rendered using the printer-builtin fonts would be missing). +

+

Q:

+ How to print with Xt/Athena widgets ? +

A:

+ There are two examples in the Xprint.org source tree which demonstrate how to use Xprint using + Athena widgets: +

  1. + xc/programs/xphelloworld/xpawhelloworld/ contains a simple + demo application which prints a Athena widget using the XawPrintShell widget class. +

  2. + xc/programs/xphelloworld/xpxthelloworld/ contains a simple + demo application which prints a Athena widget without using a special print + widget class (however, if possible a print shell such as XawPrintShell or + XmPrintShell should be used since this is the easier way to add print + support to an Athena application). +

+

Q:

+ How to print with Xt/Motif widgets ? +

A:

+ The Xprint.org source tree contains the xpxmhelloworld (xc/programs/xphelloworld/xpxmhelloworld/) + application to demonstrate how to print using the Motif2 toolkit. +

Q:

+ What are the differences between normal display and Xprint display ? +

A:

+ XXX +

Q:

+ How do I scale images ? +

A:

+ XXX +

Q:

+ libXp Image scaling vs. max. request size ? +

A:

+ XXX +

Q:

+ How can I use XprintUtils ? +

A:

+ XXX +

Q:

+ How do I calculate the DPI values for Xprt DDX screens ? +

A:

+ XXX +

Q:

+ How do I find scaleable fonts ? +

A:

+ XXX +

Q:

+ How do I find printer-builtin fonts ? +

A:

+ XXX +

Q:

+ The XLFD for Printer-builtin fonts look like bitmap fonts - is that bad ? +

A:

+ No, this is not "bad". The XLFD of a printer-builtin font only looks like a bitmap font since + the *.pmf (Printer metrics file) format is a PCF file format variant (the DPI values in the XLFD + AFAIK specifies the resolution which was used for generating the metrics) - however this does not + change the fact that the printer-builtin fonts are outline scaleable fonts these fonts reside in the + printer's ROM). +

Q:

+ When printing using the XawPrintShell/XmPrintShell print shells my PostScript output + is always corrupt. What am I doing wrong ? +

A:

+ Make sure the widgets (such as text input widgets) have the (blinking) cursor turned-off. + Setting the XmNcursorPositionVisible, to False usually + solves the problem (for Motif2 widgets). + Example: +

+...
+XtSetArg(args[n], XmNcursorPositionVisible, False);
+...
+

+

Q:

+ When printing using the XawPrintShell/XmPrintShell + print shells I always get a grey/dithered background on paper. + Any idea how to change that to "white" ? +

A:

+ XXX +

Q:

+ Are there any caveats/suggestions when printing via Xt/Motif2 widgets ? +

A:

+ There are a couple of Xt resources which may likely differ from the normal values (e.g. those values + used for a video Xserver): +

Core class level

+

XmNbackground resource

+ The application will probably want to set the XmNbackground resource + to "white" to match the default paper color. +

XmNborderWidth resource

+ The application will probably want to set the XmNborderWidth resource + to "0" (usually the default value) to avoid that a black border appears around the widget. +

+

XmPrimitive class

+

XmNshadowThickness and XmNhightlightThickness resources

+ The application will probably want to set XmNshadowThickness and + XmNhightlightThickness to "0" (usually the default value) to avoid + 3D border effects on the printout (depends on application and author's preference... + :-)). +

+

XmText and XmTextField classes

+

XmNcursorPositionVisible resource

+ The application will probably want to set XmNcursorPositionVisible + to False to avoid that the cursor is visible on printouts (and to avoid + problems with some nasty implementation details which may cause corrupted PostScript output). +

XmNscrollHorizontal and XmNscrollVertical resources

+ The application will probably want to set the XmNscrollHorizontal and + XmNscrollVertical resources to False to suppress printing + of scrollbars (on paper "scrolling" is replaced with "pagination" except for rare exceptions + (like 1:1 WYSIWYG-printing)). +

XmNmarginWidth and XmNmarginHeight resources

+ The application will probably want to recalculate the XmNmarginWidth and + XmNmarginHeight resources based on the (far) higher print resolution + (or reverse: set them to "0" - depending on what style matches + the application needs better...). +

+

XmLabel class

+

XmNmarginTop, XmNmarginBottom, + XmNmarginRight, XmNmarginLeft, + XmNmarginWidth, XmNmarginHeight and + XmNalignment resources

+ The application will probably want to use different value for XmLabel class's + XmNmarginTop, XmNmarginBottom, XmNmarginRight, + XmNmarginLeft, XmNmarginWidth, XmNmarginHeight and + XmNalignment resources. These resources are mainly usefull when the widget holds a + border, highlight or shadow of some kind. If borders are not to be transferred there is no real need to transfer + a margin either. +

+

+

Q:

+ Can I change the paper size/resolution/page orientation/etc. when printing using the + XawPrintShell/XmPrintShell print shells ? +

A:

+ Yes, it is allowed to change the page attributes in the page setup callback + (e.g. XawNpageSetupCallback or XmNpageSetupCallback) + since this callback is always called before XpStartPage + (for the 2nd and following pages: between XpEndPage and + XpStartPage). + Note that changing page attributes will automagically update the print shell widget size + (e.g. attributes XawNminX, XawNminY, XawNmaxX and XawNmaxX (XawPrintShell) + or + XmNminX, XmNminY, XmNmaxX and XmNmaxX (XmPrintShell) are updated based + on events send by the Xp Extension and then the print shell is resized based on the new values (XawPrintShell is slightly more flexible + since the size mode can be defined using the XawNlayoutMode attribute)). +

Known bugs

Problem + Xprt build from Xfree86 sources is completely broken and unuseable. +
Problem + The code which matches XLFD names to PS Type1 font names is + case-sensitive in Xprts build from X.org X11R6.5.1/X11R6.6 and the + current Solaris Xprt. This may cause that the PS DDX refuses to + download PS Type1 fonts. +
Problem + Xprt build from X11R6.5.1/X11R6.6 sources and Solaris's version of + Xprt can only download PFA (PS ASCII font) fonts which ends of the + ending "*.pfa". +
Problem + There is an issue how the Linux and Solaris Xprt handles the + "copy-count" of a print job. The result may be that a job with n + copies of a document end-up in n jobs with n copies (usually equals + to n^2 copies). +
Problem + Xprt build from Xfree86 sources is completely broken and unuseable. +
Problem + The code which matches XLFD names to PS Type1 font names is + case-sensitive in Xprts build from X.org X11R6.5.1/X11R6.6 and the + current Solaris Xprt. This may cause that the PS DDX refuses to + download PS Type1 fonts. +
Problem + Xprt build from X11R6.5.1/X11R6.6 sources and Solaris's version of + Xprt can only download PFA (PS ASCII font) fonts which ends of the + ending "*.pfa". +
Problem + There is an issue how the Linux and Solaris Xprt handles the + "copy-count" of a print job. The result may be that a job with n + copies of a document end-up in n jobs with n copies (usually equals + to n^2 copies). +
Problem

+ Xprt build from Xfree86 sources is completely broken and unuseable. +

Solution

+ Build Xprt from the CVS tree at http://xprint.mozdev.org/ or the + X.org X11R6.5.1 sources (note that the client side Xprint extension + library ("libXp.so") from Xfree86 is not broken and do not need to be + replaced). +

Problem

+ The code which matches XLFD names to PS Type1 font names is + case-sensitive in Xprts build from X.org X11R6.5.1/X11R6.6 and the + current Solaris Xprt. This may cause that the PS DDX refuses to + download PS Type1 fonts. +

Solution

+ Patch available, I am looking for a way to get the patch into the X11 + and Solaris source trees... +

Problem

+ Xprt build from X11R6.5.1/X11R6.6 sources and Solaris's version of + Xprt can only download PFA (PS ASCII font) fonts which ends of the + ending "*.pfa". +

Solution

+ Either convert PFB (PS Type 1 binary font) to PFA format and adjust + the fonts.dir and fonts.scale file or get a patch for the sources. + I am looking for a way to get the patch into the X11 and Solaris + source trees (the fixed version can download both PFA/PFB fonts in + PFA format and even handles non-standard file extensions). +

Problem

+ There is an issue how the Linux and Solaris Xprt handles the + "copy-count" of a print job. The result may be that a job with n + copies of a document end-up in n jobs with n copies (usually equals + to n^2 copies). +

Solution

+ Xprt build from xprint.mozdev.org sources has been fixed in release + 007, see xprint.mozdev.org bug 1378 + ("PS DDX creates n^2 copies of a job instead of n copies") and + bugzilla.mozilla.org 140030 + ("Setting number of copies causes too many copies to print") for details. + Solaris 2.7 Xprt still suffers from this issue... ;-( +

Unanswered questions

+ (My small ToDo list what I will write soon; 379 items missing... =:-) + Email me if you want one of these answered "now" and/or to contribute + an answer... :) +

How do I create a model-config for my printer ?
How can I customize a model-config for my site/machine ?
Which attributes/values can be set in a model-config ?
Why can't I set default values (for my {paper size, resolution, ...}) in the model-config ?
Should I add the fonts in the model-config dir to the Xserver's font path ?
What are the fonts in the model-config dir for ?
Can I use a font server for all fonts instead of passing then directly to the Xprint server ?
Does the Xprint PostScript driver do full rasterisation of the print job ?
Is it possible to prepare a printer config entry so that the PS + output is piped to "ps2pdf" and will produce directly a PDF file? + It would be nice to have mozilla directly producing PDF files when + printing. +
Problem: I have changed the Xprt config - but "xplsprinters -l"
(or any other Xprint application) does not show the change.
Any idea what I am doing wrong ?
How can I add a font path to Xprt ?
Why does "xset +fp path_to_font" not work in some cases ?
How can I get a "core"-dump when Xprt crashes ?
How can I debug Xprt (hint: use "-audit 4") ?
How can I debug Xprt with Sun Workshop (hint: "check -access") ?
How can I check whether Xprint is "active" ? / How can I verify that a Xprint is working ?

+

Acknowledgements

+ We'd like like to express their gratitude to the whole community for + providing insightful answers to innumerable questions. In particular, + the following people (listed alphabetically) have contributed to this + FAQ (apologies, in advance, if anyone has been forgotten): +

+

Alan Coopersmith
Giuseppe Ghibò
Thomas Gilg
Jay Hobson
Masaki Katakai
Simon Montagu
Drew Parsons
(and many many others)

+

Index: xc/doc/hardcopy/XPRINT/Xprint_FAQ.txt =================================================================== RCS file: xc/doc/hardcopy/XPRINT/Xprint_FAQ.txt diff -N xc/doc/hardcopy/XPRINT/Xprint_FAQ.txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/doc/hardcopy/XPRINT/Xprint_FAQ.txt 21 Apr 2004 09:33:52 -0000 @@ -0,0 +1,3113 @@ + +Xprint Frequently Asked Questions + _________________________________________________________________ + + About this FAQ + + Archive-name: Xprint/FAQ + + Version: 0.9 + + Last-Modified: 2004/02/16 04:15:16 + + Maintained-by: Roland Mainz <[1]roland.mainz@nrubsig.org> + + The following is a list of questions that are frequently asked about + Xprint. + + You can help make it an even better-quality FAQ by writing a short + contribution or update and sending it BY EMAIL ONLY to me. A + contribution should consist of a question and an answer, and + increasing number of people sends me contributions of the form "I + don't know the answer to this, but it must be a FAQ, please answer it + for me". Please read the FAQ first (including the item "[2]Getting + Help") and then feel free to ask me if it is not in the FAQ. + + Thanks! + + The latest Xprint FAQ and some other goodies can be obtained through + http from + [3]http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/ + doc/hardcopy/XPRINT/Xprint_FAQ.html or + [4]http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/ + doc/hardcopy/XPRINT/Xprint_FAQ.txt (the DocBook/XML master source file + is + [5]http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/ + doc/hardcopy/XPRINT/Xprint_FAQ.xml ). + +Note + + Note that the FAQ has not been finished yet (nor is it + half-finished...), many items marked with "XXX" as the answer have + still to be written (or have to be copy&pasted from my item + collection... :) + +Frequently Asked Questions with Answers + + 1. [6]General + + Q: [7]What is "Xprint" ? + Q: [8]Where can I get Xprint/Xprt from ? + Q: [9]What is "Xprt" ? + Q: [10]Where can I get help for problems with Xprint ? + Q: [11]"Why do some people like Xprint ?" / "What are the + advantages of Xprint ?" + + Q: [12]Why do some people dislike Xprint ? + Q: [13]Does Xprint support anti-aliased fonts ? + Q: [14]How can I check if Xprint is working and should be used ? + Q: [15]How can I view PS(=PostScript) files ? + Q: [16]How can I view PCL files ? + Q: [17]How does Xprt find fonts ? + Q: [18]How can I print TrueType fonts with Xprint ? + Q: [19]What does "DDX" mean ? + Q: [20]What does "DIX" mean ? + Q: [21]What does "PDL" mean ? + Q: [22]I have twenty printers installed on my system - but Xprt + only shows two screens. Where are all the other printers + ? + + Q: [23]Which platforms support Xprint ? + Q: [24]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: [25]Which spelling is correct - "Xprint", "XPrint", "Xprinter" + or Xprt" ? + + Q: [26]Which applications support Xprint ? + Q: [27]Is "Xprint" "mozilla"-only (I saw that it's hosted by + mozdev.org) ? + + Q: [28]Under which license is the source code from + xprint.mozdev.org distributed under ? + + 2. [29]Usage + + Q: [30]How do I configure Xprint on the client side ? + Q: [31]How do I start Xprt ? + Q: [32]How can I get a list of printers managed by Xprint ? + Q: [33]How can I start Xprt at boot time ? + Q: [34]How can I start Xprt per-user ? + Q: [35]How can I start Xprt only for one application ? + Q: [36]How can I filter the font path which should be passed to + Xprt for certain fonts ? + + Q: [37]How can I manage access control to the Xprt server ? + Q: [38]How can I log access to the Xprt server ? + Q: [39]Does it require "root" permissions to use Xprt/Xprint ? + Q: [40]How can I see the attributes of a printer managed by + Xprint ? + + Q: [41]How can I list the font path used by a Xprt server ? + Q: [42]"xset q" lists all model-specific font dirs (like + PRINTER:/myxpcfg/C/print/models/SPSPARC2/fonts/") - is + that a bug ? + + Q: [43]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: [44]How can I forward Xprint services when logging-in via ssh + to another machine ? + + 3. [45]Configuration + + Q: [46]How do I change the defaults for + double-sided/single-sided/etc. printing ? + + Q: [47]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: [48]How do I change the default printer resolution ? + Q: [49]How do I change the default settings for + "portrait"/"landscape"/"seascape" (=page orientation) ? + + Q: [50]How can I prevent Xprt from using any bitmap(=gfx) fonts ? + + Q: [51]I want only my manually added printers managed by Xprint. + How can I prevent Xprt from looking-up the printer names + automatically ? + + Q: [52]How can I specify an own program/script to enumerate the + printers on my system ? + + Q: [53]Which program is used by default by Xprt to enumerate the + printers on my system ? + + Q: [54]Where can I get more PostScript Type1 fonts from ? + Q: [55]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: [56]Can I use the fontserver ("xfs") with Xprt ? + Q: [57]What is a "model-config" ? + Q: [58]Where can I store the default values for printers ? + Q: [59]How can I create my own model-config ? + Q: [60]How can I create my own PMF "fonts" ? + Q: [61]Where can I get more model-configs from ? + Q: [62]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: [63]Are config files and/or the PMF fonts architecture + dependent ? + + Q: [64]Can I localise my Xprint/Xprt configuration (l10n) ? + Q: [65]Can I execute my own scripts to process the PostScript + files generated by Xprt ? + + Q: [66]How can I disable "xp_ps_spooldir_tmp_Xprintjobs" / + "xp_pdf_spooldir_tmp_Xprintjobs" printer targets ? + + 4. [67]Troubleshooting + + Q: [68]Xprt refuses to start with the message "sh: lpc: command + not found" on my Linux machine. What does that mean ? + + Q: [69]When the application (=client side) tries to connect to + the Xprt (Xserver) side it fails with a Xlib: connection + to "meridian:52.0" refused by server Xlib: Client is not + authorized to connect to Server What does that mean ? + + Q: [70]Xprt refuses to start with the message "failed to set + default font path '...' Fatal server error: could not + open default font 'fixed'". What does that mean ? + + Q: [71]Just copying my fonts into a directory and adding the path + to my Xprt command line didn't work - I always get "Fatal + server error: could not open default font 'fixed'". What + am I doing wrong ? + + Q: [72]Xprt refuses to start with the message "Fatal server + error: Cannot establish any listening sockets - Make sure + an X server isn't already running". What does that mean ? + + Q: [73]Xprt refuses to start with the message "Fatal server + error: Failed to establish all listening sockets". What + does that mean ? + + Q: [74]Xprt refuses to start with the message "Fatal server + error: could not open default font 'fixed'" or "Fatal + server error: could not open default cursor font + 'cursor'". + + Q: [75]Xprt refuses to start with the message "Fatal server + error: no screens found". What does that mean ? + + Q: [76]"Printing itself works but the printout covers only 1/4 of + the paper - what am I doing wrong ?" + + Q: [77]"Printing works but I get large borders/margins..." / + "[Top] margin is too small" / "Margins are wrong" / etc. + + Q: [78]Xprt prints a warning like "Xp Extension: could not find + config dir /usr/X11R6/lib/X11/C/print" - what does that + mean ? + + Q: [79]Xprt crashes with "Fatal server error: Beziers this big + not yet supported" What does that mean ? + + Q: [80]"My PS Type1 font does not work with my Xserver - how can + I fix this ?" + + Q: [81]I can't get it working. I have set ${DISPLAY} correctly to + point to the Xprt display and... ... What is going wrong + ? + + Q: [82]When I try to print via Xprint I get the message "Fatal + server error: unable to exec '/usr/bin/lp'". What is + going wrong here ? + + Q: [83]The Solaris Xprt prints some error messages about + PostScript fonts like "FOOBAR not found, using Courier. + CMEX0123 not found, using Courier." etc. and uses + "Courier" instead of these fonts... + + Q: [84]"Xprt refused to start, complaining about a missing dir + (/etc/X11/xserver/C/print/ directory)... I created it by + hand (empty) and started Xprt but it still does not work + properly..." + + Q: [85]My Linux system already shipps with a + '/usr/X11R6/bin/Xprt'-binary. Do I need the binary + distribution from http://xprint.mozdev.org/ ? + + Q: [86]I am getting the error message "error opening security + policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy". + What does that mean ? + + Q: [87]I have modified the "HPLJ4family" [or "HPDJ1600C" etc.] + printer model to work with my PostScript printer, but + when I print I get empty places where some text should be + - what am I doing wrong here ? + + Q: [88]Xprt outputs warning messages like: Xp Extension: Can't + load driver XP-PCL-MONO init function missing Xp + Extension: Can't load driver XP-RASTER init function + missing What does that mean ? + + Q: [89]Printing on Solaris with Mozilla/Eclipse [or any other + Xprint client] removes spaces between words. What is + going wrong ? + + Q: [90]Installation of the "GISWxprint" / "GISWxprintglue" + packages fails like this: # pkgadd -d + /space/staging/xprint/GISWxprint.pkg pkgadd: ERROR: no + packages were found in Any idea + what I am doing wrong ? + + Q: [91]Printing page results in [two/three/.../16] leading blank + pages, followed by a correct (but offset) page. Any idea + what is going wrong ? + + 5. [92]Software development + + Q: [93]How does the X print server (Xprt) and the Xlib client + side differ from the "normal" video Xserver/video client + side ? + + Q: [94]How can I get the printable area (e.g. the portion of the + page on which the printer is physically capable of + placing ink) of the paper after I have chosen a paper ? + + Q: [95]Do "offscreen" pixmaps work on Xprt ? + Q: [96]How can I get the DPI value for the current Xprt server ? + Can I use the values from "xdpyinfo" ? + + Q: [97]Why does Xprt not offer the MIT-SHM protocol extension ? + Q: [98]Does Xprint/Xprt support font rotation ? + Q: [99]When I render something on my window and call XpStartPage + all the rendered stuff is gone, I only get a white, empty + paper. What is going wrong here ? + + Q: [100]What is XpStartDoc for ? + Q: [101]How does the XLFD for printer-builtin fonts look like ? / + How can I find/identify printer-builtin fonts ? + + Q: [102]How can I scale images using the Xprint API ? + Q: [103]Can I pass my own PostScript code (fragment) to the print + spooler instead of letting Xprt's PostScript DDX generate + it ? + + Q: [104]When I use XpPutDocumentData I get a BadValue X protocol + error. Any idea what am I doing wrong ? + + Q: [105]How do I use the XprintUtil library ? + Q: [106]Why does the XGetImage not work for Xprt ? + Q: [107]How to print with Xt/Athena widgets ? + Q: [108]How to print with Xt/Motif widgets ? + Q: [109]What are the differences between normal display and + Xprint display ? + + Q: [110]How do I scale images ? + Q: [111]libXp Image scaling vs. max. request size ? + Q: [112]How can I use XprintUtils ? + Q: [113]How do I calculate the DPI values for Xprt DDX screens ? + Q: [114]How do I find scaleable fonts ? + Q: [115]How do I find printer-builtin fonts ? + Q: [116]The XLFD for Printer-builtin fonts look like bitmap fonts + - is that bad ? + + Q: [117]When printing using the XawPrintShell/XmPrintShell print + shells my PostScript output is always corrupt. What am I + doing wrong ? + + Q: [118]When printing using the XawPrintShell/XmPrintShell print + shells I always get a grey/dithered background on paper. + Any idea how to change that to "white" ? + + Q: [119]Are there any caveats/suggestions when printing via + Xt/Motif2 widgets ? + + Q: [120]Can I change the paper size/resolution/page + orientation/etc. when printing using the + XawPrintShell/XmPrintShell print shells ? + +1. General + + Q: [121]What is "Xprint" ? + Q: [122]Where can I get Xprint/Xprt from ? + Q: [123]What is "Xprt" ? + Q: [124]Where can I get help for problems with Xprint ? + Q: [125]"Why do some people like Xprint ?" / "What are the advantages + of Xprint ?" + + Q: [126]Why do some people dislike Xprint ? + Q: [127]Does Xprint support anti-aliased fonts ? + Q: [128]How can I check if Xprint is working and should be used ? + Q: [129]How can I view PS(=PostScript) files ? + Q: [130]How can I view PCL files ? + Q: [131]How does Xprt find fonts ? + Q: [132]How can I print TrueType fonts with Xprint ? + Q: [133]What does "DDX" mean ? + Q: [134]What does "DIX" mean ? + Q: [135]What does "PDL" mean ? + Q: [136]I have twenty printers installed on my system - but Xprt only + shows two screens. Where are all the other printers ? + + Q: [137]Which platforms support Xprint ? + Q: [138]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: [139]Which spelling is correct - "Xprint", "XPrint", "Xprinter" or + Xprt" ? + + Q: [140]Which applications support Xprint ? + Q: [141]Is "Xprint" "mozilla"-only (I saw that it's hosted by + mozdev.org) ? + + Q: [142]Under which license is the source code from xprint.mozdev.org + distributed under ? + + 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 [143]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 + [144]http://xprint.mozdev.org/, Debian Linux has a package based + on the same sources (see + [145]http://packages.qa.debian.org/x/xprint-xprintorg.html). + +Note + For Solaris >= 2.7 [146]http://xprint.mozdev.org/ provides the + "GISWxprintglue" and "GISWxprint" packages (available from + [147]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 [148]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 + [149]http://xprint.mozdev.org/ which hosts various resources including + a [150]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: [151]Xprint prints just a XWD dump of the Xserver bitmap + Myth: [152]Xprint cannot handle non-'ISO Latin 1' chars + Myth: [153]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: [154]Xprint prints only graphics(=bitmap/gfx) fonts + Myth: [155]Xprint does not support pages sizes larger than DIN-A4 + Myth: [156]Xprint does not support rotated text + + 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: + 1. X to native Postscript + 2. X to native PCL5 + 3. X to native PCL3 + 4. 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 PostScipt Type1 fonts. However this is the fallback - the + last option used by Xprt. Used if everything else fails. But when + someone does not pass any 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 + [157]STSF font API which supports matrix transformations as well). + Fonts can be rotated at any angle. Take a look at the [158]SOFTWARE + DEVELOPMENT section in this FAQ for examples... + + 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: + + * On Unix/Linux (general): + + GhostScript ("gs") and GhostView ("gv" and it's KDE- and + Gnome-specific versions "kghostview" and "ggv") + + * Solaris: + + /usr/dt/bin/sdtimage (DPS-based image viewer for CDE) + + /usr/openwin/bin/pageview (DPS-based image viewer for + OpenWindows) + + Q: + + How can I view PCL files ? + A: + + XXX - [159]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: + 1. Printer-builtin fonts (defined by the fonts/-dir in the + model-config) + 2. PostScript fonts (will be downloaded via generated print job) + 3. GFX-fonts build from X11 scaleable fonts + 4. GFX-fonts build from X11 bitmap fonts + + Q: + + How can I print TrueType fonts with Xprint ? + A: + + 1. Linux Xprt build from [160]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. + 2. Sun's Xprt on Solaris (/usr/openwin/bin/Xprt) has TrueType font + support out-of-the-box and does not require any special actions. + 3. 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. + 4. Sourceforge has a TrueType to PostScript Type 1 converter project, + see [161]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 ([162]"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 ([163]"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 [164]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 (full framework incl. special widgets like + XmPrintShell) + * [165]Common Desktop Environment (CDE) 2.x + * [166]Mozilla + * Eclipse + * KDE/Qt support is comming is planned for the end of Dec/2003 + * 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 the X11 API used by + many applications ([167]mozdev.org is just hosting the development + area, but this does not mean the project is limited to mozilla... :)). + 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 and + X.org: +Copyright (c) + +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 wi +thout +restriction, including without limitation the rights to use, copy, modify, merg +e, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit perso +ns 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 IMPL +IED, 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 F +OR 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. + +2. Usage + + Q: [168]How do I configure Xprint on the client side ? + Q: [169]How do I start Xprt ? + Q: [170]How can I get a list of printers managed by Xprint ? + Q: [171]How can I start Xprt at boot time ? + Q: [172]How can I start Xprt per-user ? + Q: [173]How can I start Xprt only for one application ? + Q: [174]How can I filter the font path which should be passed to Xprt + for certain fonts ? + + Q: [175]How can I manage access control to the Xprt server ? + Q: [176]How can I log access to the Xprt server ? + Q: [177]Does it require "root" permissions to use Xprt/Xprint ? + Q: [178]How can I see the attributes of a printer managed by Xprint ? + Q: [179]How can I list the font path used by a Xprt server ? + Q: [180]"xset q" lists all model-specific font dirs (like + PRINTER:/myxpcfg/C/print/models/SPSPARC2/fonts/") - is that a + bug ? + + Q: [181]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: [182]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: + 1. 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. + 2. The env variable ${XPRINTER} defines the default printer used by + print applications. The syntax is either or + @ + Examples: + a. + % export XPRINTER=ps003 + tells an application to look for the first printer named + "ps003" on all Xprt servers. + b. + % 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 start Xprt ? + A: + + 1. 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 + [183][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 [184][4]), too... + 2. Debian Linux: Same as [185][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 [186]bugs.debian.org bug 171174 ('"xprint-xprintorg" should + automatically populate $XPSERVERLIST') for further details on this + issue... + 3. + a. Solaris using the "GISWxprintglue" package: + [187]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 [188][4]), too... + b. Solaris using the "GISWxprint" package: + [189]http://xprint.mozdev.org/ provides a Solaris package + called "GISWxprint" which is technically identical to the + "GISWxprintglue" (see [190][3a]) but provides a Xprt binary + build from the xprint.mozdve.org sources ("GISWxprintglue" + uses the /usr/openwin/bin/Xprt binary provided by Solaris). + 4. 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. + 5. 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. + 6. 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 [191]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 + comment= + 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.hosts ( == 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: + * [192]xprint.mozdev.org bug 5092 ("[PS2PDFspooldir-GS] RFE: Add + printer model which sends PDF jobs to /tmp/Xprintjobs/") + + 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:${remoted +isplaynum}" + + 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_XPSERVERLIS +T} \${XPSERVERLIST}\"" +# EOF. + + Example usage: +% xp_print_slogin_args.ksh + + will print +Log in with: % slogin -R6100:west:6033 -R6101:north:6033 -l myloginname myremot +ehost +Set remote XPSERVERLIST with % export XPSERVERLIST="localhost:100 localhost:101 + ${XPSERVERLIST}" + +3. Configuration + + Q: [193]How do I change the defaults for + double-sided/single-sided/etc. printing ? + + Q: [194]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: [195]How do I change the default printer resolution ? + Q: [196]How do I change the default settings for + "portrait"/"landscape"/"seascape" (=page orientation) ? + + Q: [197]How can I prevent Xprt from using any bitmap(=gfx) fonts ? + Q: [198]I want only my manually added printers managed by Xprint. How + can I prevent Xprt from looking-up the printer names + automatically ? + + Q: [199]How can I specify an own program/script to enumerate the + printers on my system ? + + Q: [200]Which program is used by default by Xprt to enumerate the + printers on my system ? + + Q: [201]Where can I get more PostScript Type1 fonts from ? + Q: [202]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: [203]Can I use the fontserver ("xfs") with Xprt ? + Q: [204]What is a "model-config" ? + Q: [205]Where can I store the default values for printers ? + Q: [206]How can I create my own model-config ? + Q: [207]How can I create my own PMF "fonts" ? + Q: [208]Where can I get more model-configs from ? + Q: [209]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: [210]Are config files and/or the PMF fonts architecture dependent ? + + Q: [211]Can I localise my Xprint/Xprt configuration (l10n) ? + Q: [212]Can I execute my own scripts to process the PostScript files + generated by Xprt ? + + Q: [213]How can I disable "xp_ps_spooldir_tmp_Xprintjobs" / + "xp_pdf_spooldir_tmp_Xprintjobs" printer targets ? + + 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: + 1. Adding/modifying the following line to/in + ${XPCONFIGDIR}/C/print/attributes/document sets the default plex + for all printers to "duplex": + *plex: duplex + 2. 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: + 1. 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 + 2. 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-suppor +ted=" + 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: + 1. 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 + 2. 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: + 1. Adding/modifying the following line to/in + ${XPCONFIGDIR}/C/print/attributes/document sets the default + orientation for all printers to "portrait": + *content-orientation: portrait + 2. 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: + 1. Create a new directory: +% mkdir Xp_dummyfonts +% cd Xp_dummyfonts + 2. 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. + 3. 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 + 4. Verify: The directory should now look like this: +% ls -1 +6x13.pcf.Z +cursor.pcf.Z +fonts.alias +fonts.dir + 5. 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 + " for each printer . 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: + * Adobe: + + Commercial fonts: [214]http://www.adobe.com/type/main.html + + Free Euro font: + o Single-glyph (e.g. it contains only the euro char) euro + font: [215]http://www.adobe.com/type/eurofont.html or + [216]ftp://ftp.adobe.com/pub/adobe/type/win/all/ + ("eurofont.exe" can be unzipped using "unzip") + o ISO8859-15: XXX - WANTED!! + * Solaris shipps with various PS Type 1 fonts: + + Arabic: /usr/openwin/lib/locale/ar/X11/fonts/Type1/ + (fonts.dir and fonts.scale missing, maybe they miss the + presentation forms a&b, too [unconfirmed]) + + ISO-8859-13 (Latin 8): + /usr/openwin/lib/locale/iso_8859_13/X11/fonts/Type1/ + + ISO-8859-5 (Latin 5): + /usr/openwin/lib/locale/iso_8859_9/X11/fonts/Type1/ + + ISO-8859-8/Hebrew: + /usr/openwin/lib/locale/iso_8859_8/X11/fonts/Type1 (BROKEN, + even "type1fix" cannot fix them. Use the hebrew fonts from + [217]broken-link-/PS_Type1_iso8859-8.tar.gz) + + ISO-8859-7/Modern greek: + /usr/openwin/lib/locale/iso_8859_7/X11/fonts/Type1/ + + ISO-8859-5/Cryrillic: + /usr/openwin/lib/locale/iso_8859_5/X11/fonts/Type1/ + + ISO-8859-4 (Latin 4): + /usr/openwin/lib/locale/iso_8859_4/X11/fonts/Type1/ + + ISO-8859-2 (Latin 2): + /usr/openwin/lib/locale/iso_8859_2/X11/fonts/Type1/ + + ISO-8859-1 (Latin 1) and Symbol fonts: + /usr/openwin/lib/X11/fonts/Type1/ + + 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 [218]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 [219]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 + [220]http://xprint.freedesktop.org/cgi-bin/bugzilla/enter_bug.cgi?prod + uct=xprint&component=Server%3A+Config%3A+model-configs (e.g. + [221]http://xprint.freedesktop.org/cgi-bin/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/attributes/*", + "${XPCONFIGDIR}/${LANG}/print/models/*/model-config") + * "Xprinters" (list of printers): If there is a locale-specific + ${XPCONFIGDIR}/${LANG}/Xprinters present it will be used instead + of ${XPCONFIGDIR}/C/Xprinters (e.g. values set in + ${XPCONFIGDIR}/C/Xprinters will be ignored and the values from + ${XPCONFIGDIR}/${LANG}/Xprinters will be used instead). + * Xprt will determinate the locale which should be used based on the + ${LANG}-environment vaiable at startup time. If there is no such + variable set at that time LANG="C" is assumed. + +Note: + Attribute values for paper names and orientation names refer to + builtin strings in the DDX code (which are itself based on + international standards), these cannot be changed to your own + "inventions" (it does it make sense to try to "localize" paper + names - "ISO-A4" is "ISO-A4" even in japanese/hebrew/german etc.). + Locale-spefific attribute pools can set their own, different + values - but only within the allowed range of values supported by + the DDX and printers's model-config. + + Q: + + Can I execute my own scripts to process the PostScript files generated + by Xprt ? + A: + + Yes, there are at least two possible solutions: + 1. Create your own model-config which uses a custom + "xp-spooler-command" value - the xprint.mozdev.org's "PSspooldir" + model config (see "${XPCONFIGDIR}/C/print/models/PSspooldir/" and + "${XPCONFIGDIR}/C/print/attributes/printer" and + "${XPCONFIGDIR}/C/print/Xprinters") and "PS2PDFspooldir-GS" model + config (see "${XPCONFIGDIR}/C/print/models/PS2PDFspooldir-GS/" and + "${XPCONFIGDIR}/C/print/attributes/printer" and + "${XPCONFIGDIR}/C/print/Xprinters") are good examples for that. + 2. Use an existing "model-config" (which would normally send it's + data to a printer using the default print spooler command) and + provide a custom "xp-spooler-command". + + Procedure 2. Example (using "SPSPARC2" as printer model, + /w/xp_conv as the script to execute and "myscriptprinter" as name + of the printer): + 1. Edit ${XPCONFIGDIR}/C/print/attributes/printer and add these + lines (Xprt will replace "%printer-name%" with the printer's + name, "%copy-count%" with the number of job copies, + "%job-name%" with the job's title and "%options%" with any + custom spooler options): +myscriptprinter.xp-model-identifier: SPSPARC2 +myscriptprinter.xp-spooler-command: /w/xp_conv -p %printer-name% -c %copy-count +% -t %job-name% -o "%options%" + 2. Edit ${XPCONFIGDIR}/C/print/Xprinters and append this line: +Printer myscriptprinter + + Q: + + How can I disable "xp_ps_spooldir_tmp_Xprintjobs" / + "xp_pdf_spooldir_tmp_Xprintjobs" printer targets ? + A: + + Edit ${XPCONFIGDIR}/C/print/Xprinters and remove or comment-out (using + '#') the lines "Printer xp_ps_spooldir_tmp_Xprintjobs" and "Printer + xp_pdf_spooldir_tmp_Xprintjobs". + +Note: + + Note that Xprt will NOT start if this printer has been + removed/disabled and no other print queue is available (e.g. if + "xp_ps_spooldir_tmp_Xprintjobs" and "Printer + xp_pdf_spooldir_tmp_Xprintjobs" are the only printer target + available). + +4. Troubleshooting + + Q: [222]Xprt refuses to start with the message "sh: lpc: command not + found" on my Linux machine. What does that mean ? + + Q: [223]When the application (=client side) tries to connect to the + Xprt (Xserver) side it fails with a Xlib: connection to + "meridian:52.0" refused by server Xlib: Client is not + authorized to connect to Server What does that mean ? + + Q: [224]Xprt refuses to start with the message "failed to set default + font path '...' Fatal server error: could not open default font + 'fixed'". What does that mean ? + + Q: [225]Just copying my fonts into a directory and adding the path to + my Xprt command line didn't work - I always get "Fatal server + error: could not open default font 'fixed'". What am I doing + wrong ? + + Q: [226]Xprt refuses to start with the message "Fatal server error: + Cannot establish any listening sockets - Make sure an X server + isn't already running". What does that mean ? + + Q: [227]Xprt refuses to start with the message "Fatal server error: + Failed to establish all listening sockets". What does that mean + ? + + Q: [228]Xprt refuses to start with the message "Fatal server error: + could not open default font 'fixed'" or "Fatal server error: + could not open default cursor font 'cursor'". + + Q: [229]Xprt refuses to start with the message "Fatal server error: no + screens found". What does that mean ? + + Q: [230]"Printing itself works but the printout covers only 1/4 of the + paper - what am I doing wrong ?" + + Q: [231]"Printing works but I get large borders/margins..." / "[Top] + margin is too small" / "Margins are wrong" / etc. + + Q: [232]Xprt prints a warning like "Xp Extension: could not find + config dir /usr/X11R6/lib/X11/C/print" - what does that mean ? + + Q: [233]Xprt crashes with "Fatal server error: Beziers this big not + yet supported" What does that mean ? + + Q: [234]"My PS Type1 font does not work with my Xserver - how can I + fix this ?" + + Q: [235]I can't get it working. I have set ${DISPLAY} correctly to + point to the Xprt display and... ... What is going wrong ? + + Q: [236]When I try to print via Xprint I get the message "Fatal server + error: unable to exec '/usr/bin/lp'". What is going wrong here + ? + + Q: [237]The Solaris Xprt prints some error messages about PostScript + fonts like "FOOBAR not found, using Courier. CMEX0123 not + found, using Courier." etc. and uses "Courier" instead of these + fonts... + + Q: [238]"Xprt refused to start, complaining about a missing dir + (/etc/X11/xserver/C/print/ directory)... I created it by hand + (empty) and started Xprt but it still does not work + properly..." + + Q: [239]My Linux system already shipps with a + '/usr/X11R6/bin/Xprt'-binary. Do I need the binary distribution + from http://xprint.mozdev.org/ ? + + Q: [240]I am getting the error message "error opening security policy + file /usr/X11R6/lib/X11/xserver/SecurityPolicy". What does that + mean ? + + Q: [241]I have modified the "HPLJ4family" [or "HPDJ1600C" etc.] + printer model to work with my PostScript printer, but when I + print I get empty places where some text should be - what am I + doing wrong here ? + + Q: [242]Xprt outputs warning messages like: Xp Extension: Can't load + driver XP-PCL-MONO init function missing Xp Extension: Can't + load driver XP-RASTER init function missing What does that mean + ? + + Q: [243]Printing on Solaris with Mozilla/Eclipse [or any other Xprint + client] removes spaces between words. What is going wrong ? + + Q: [244]Installation of the "GISWxprint" / "GISWxprintglue" packages + fails like this: # pkgadd -d + /space/staging/xprint/GISWxprint.pkg pkgadd: ERROR: no packages + were found in Any idea what I am + doing wrong ? + + Q: [245]Printing page results in [two/three/.../16] leading blank + pages, followed by a correct (but offset) page. Any idea what + is going wrong ? + + Q: + + Xprt refuses to start with the message "sh: lpc: command not found" on + my Linux machine. What does that mean ? + A: + + Some versions of Xprt look up printer queues using "lpc" on Linux. In + this case "lpc" cannot be found for some reason. Solution: Find the + place where "lpc" is installed on your machine (some distributions put + it into /usr/sbin, some into /usr/bin/) and check whether your PATH + env var includes this directory. Example (if "lpc" is located in + /usr/sbin/): + % which lpc + /usr/sbin/lpc + % export PATH=$PATH:/usr/sbin + # Start Xprt ... + % Xprt + + Q: + + When the application (=client side) tries to connect to the Xprt + (Xserver) side it fails with a +Xlib: connection to "meridian:52.0" refused by server +Xlib: Client is not authorized to connect to Server + + What does that mean ? + A: + + X11 implements access control. You can have host-based, cookie-based + (a "cookie" is used like a passport) or user-based (SecureRPC or + Kerberos5) authentification. Xsecurity(7) has most of the details. + 1. No access control: . If you do not want to use access control for + Xprt then you can start it with the option "-ac" (see Xserver(1x)) + to disable the access control. Example: + % Xprt -ac -audit 4 :12 + will start Xprt with access control disabled and with auditing + enabled (e.g. the "-audit 4" option). + +WARNING + Disabling the access control will enable everyone who can access + Xprt to print on your printers (that's why the above example shows + how to use auditing, too - that you can see who does something + with Xprt...) !! + 2. Host-based access control: . Host-based access control can be + archived using /etc/X.hosts ( == display number, e.g. + /etc/X0.hosts for display 0 (see Xserver(1x) manual page for + further details)). + + Procedure 3. Example + 1. Add the following line to `/etc/X12.hosts' (assuming you want + that the hosts 'merkur' and 'mars' should be able to access + the Xprt server running as display 12 on your host 'neptun'): +INET:merkur +INET:mars + 2. Start Xprt + 3. Verify that Xprt is correctly configured: +% export DISPLAY=neptun:12 +% xhost +access control enabled, only authorized clients can connect +INET:localhost +LOCAL: +INET:merkur +INET:mars + + Q: + + Xprt refuses to start with the message "failed to set default font + path '...' Fatal server error: could not open default font 'fixed'". + What does that mean ? + A: + + This means one or more components in the font path (set via the option + "-fp") are either... + * ... not valid + * ... contain fonts not supported by this Xserver (e.g. support has + not be compiled "in" (usually happens for TrueType (which are only + support for Solaris version of Xprt and xprint.mozdev.org releases + >= 008), OpenType (which are only supported by xprint.mozdev.org + releases 009 or higher) or F3 fonts (Sunsoft/F3 fonts are + Solaris-specific and not supported by other vendors (AFAIK)) when + support for these fonts was not enabled at build time)) + * ... no font or font alias in the font path matches the name + "fixed" + * ... an entry in fonts.dir or fonts.alias with the name "fixed" + which references a non-existing or non-readable file + + Q: + + Just copying my fonts into a directory and adding the path to my Xprt + command line didn't work - I always get "Fatal server error: could not + open default font 'fixed'". What am I doing wrong ? + A: + + Every Xserver needs an index file called fonts.dir to tell it which + fonts are available in this directory and which properties these fonts + have. + + If you are lucky there may be already a fonts.scale file which can be + used by "mkfontdir" to create the fonts.dir file. If there is no + fonts.scale then you have to create your own fonts.dir/fonts.scale + either by hand or via tools like "mkfontscale" (works for all types of + scaleable fonts), "type1inst" (for PS Type1 fonts; see + [246]http://packages.debian.org/stable/utils/type1inst.html) or + "ttmkfdir" (for TrueType fonts; see + [247]http://packages.debian.org/stable/x11/ttmkfdir.html). + Q: + + Xprt refuses to start with the message "Fatal server error: Cannot + establish any listening sockets - Make sure an X server isn't already + running". What does that mean ? + A: + + There is already a Xserver running at the display ID you have + specified to start Xprt (for example your framebuffer Xserver runs at + ":0" then Xprt can't run at the same display display). + Q: + + Xprt refuses to start with the message "Fatal server error: Failed to + establish all listening sockets". What does that mean ? + A: + + This means that the Xserver could not open one of it's sockets. Check + the permission of /tmp/.X11-pipe and /tmp/.X11-unix (on Solaris a + Xserver must run set-gid "root" to access these directories). Either + fix the permission or start Xprt with the option "-pn". Using this + option requires to access the server always with + : (see Xserver(1x) manual page for the + side-effects of this option). + Q: + + Xprt refuses to start with the message "Fatal server error: could not + open default font 'fixed'" or "Fatal server error: could not open + default cursor font 'cursor'". + A: + + All Xservers at least two fonts as the minimum: One fixed-width font + ("fixed") and one font for the cursor ("cursor"). Be sure that the + font path contains these fonts. + Q: + + Xprt refuses to start with the message "Fatal server error: no screens + found". What does that mean ? + A: + + Cause: This means that Xprt could not find any printers. Either there + are no printers installed, "lpstat"/"lpc" could not find any printers + or the configuration does not contain any manual printer + configurations (see Q/A item "Which program is used by default by Xprt + to enumerate the printers on my system" for further details...). + + Solution: Two solutions: + 1. Using "PSspooldir" model: . Xprt releases from + [248]http://xprint.mozdev.org/ provide the "PSspooldir" model + config for such cases. Just edit the "Xprinters" file and add this + line: +Printer xp_ps_spooldir_tmp_Xprintjobs + this will add the pre-configured (see + ${XPCONFIGDIR}/C/print/attributes/printer) + "xp_ps_spooldir_tmp_Xprintjobs" printer which will send jobs to + the directory "/tmp/Xprintjobs/" instead to a printer queue. (This + feature was added in the xprint.mozdev.org release 007, see + [249]xprint.mozdev.org bug 2475 ("RFE: Need model-config which + spools print jobs in a predefined directory").) + 2. Manual setup (task list): . + + 1. Provide a simple "Xprinters" spec file which contains a dummy + queue. Example: +# Create "Xprinters_onlydummy" file which turns autolookup of printers +# OFF (using "Augment_Printer_List %none%") and provides one dummy +# queue called "ps_myscript" instead (using "Printer ps_myscript") +% echo "Augment_Printer_List %none%" >Xprinters_onlydummy +% echo "Printer ps_myscript" >>Xprinters_onlydummy + 2. Edit ${XPCONFIGDIR}/C/print/attributes/printer and add these + two lines: +ps_myscript.xp-model-identifier: PSdefault +ps_myscript.xp-spooler-command: /home/sanja/xprint_test/my_xprt_cat_script.sh + This means that the printer "ps_myscript" now uses the + "PSdefault" printer model and it will feed the jobs to the + script "/home/sanja/xprint_test/my_xprt_cat_script.sh" (via + stdin). Note that the absolute path is required for + "*xp-spooler-command". + 3. Start Xprt on display 18, passing the "Xprinters_onlydummy" + using the "-XpFile" option: +% Xprt -XpFile ./Xprinters_onlydummy -pn -ac -audit 4 :18 + + Q: + + "Printing itself works but the printout covers only 1/4 of the paper - + what am I doing wrong ?" + A: + + This is usually an indicator for a wrong DPI setting. The default + "PSdefault" model config uses 300 DPI but some printers only support + 600 DPI. + + Workaround: Edit ${XPCONFIGDIR}/C/print/attributes/document and + replace the line "*default-printer-resolution: 300" with + "*default-printer-resolution: 600" (Note that locale-specific settings + in ${XPCONFIGDIR}/${LANG}/print/attributes/document always override + values set in ${XPCONFIGDIR}/C/print/attributes/document.) + + Solution: Create a model-config for your printer which only contains + attributes supported by your printer ("printer-resolutions-supported" + is the attribute in the "model-config" which holds the space-seperated + list of DPI values which are supported by the printer). + Q: + + "Printing works but I get large borders/margins..." / "[Top] margin is + too small" / "Margins are wrong" / etc. + A: + + Two possible causes: + * Usually same issue as "Printing itself works but the printout + covers only 1/4 of the page"-issue: Wrong DPI. Solution: Check the + DPI value and adjust it as described in the FAQ item above. Common + DPI values for the PostScript DDX are 240, 300, 360, 400 and 600 + DPI. + * You are trying to print "US-letter" on a "DIN-A4" paper or + "DIN-A4" on "US-letter". + Solution: Check your paper settings + Note that the default papersize for Xprt depends on the locale + (e.g. on the env var ${LANG}) Xprt is running in - "en_US"&co. get + US-letter, all others use DIN-A4 (incl. german/austrian etc. + locales)). Exception from this rule: If the selected printer does + not support the default paper size it will set no default paper + size for this printer (then the application side has to make an + explicit choice). + + Q: + + Xprt prints a warning like "Xp Extension: could not find config dir + /usr/X11R6/lib/X11/C/print" - what does that mean ? + A: + + This is actually the worst case what can happen. The message indicates + that Xprt was unable to find it's configuration data. + + Solution: Two solutions are possible: + * Install the configuration data at the requested location + (/usr/X11R6/lib/X11/C/print/ in this example) + * Set the ${XPCONFIGDIR} env var to the location of the Xprt + configuration directory. + + Q: + + Xprt crashes with "Fatal server error: Beziers this big not yet + supported" What does that mean ? + A: + + This is a known issue in the X11R6.5.1 code. In rare cases some + PostScript Type1 fonts can trigger this. See "My PS Type1 font does + not work with my Xserver" ... + Q: + + "My PS Type1 font does not work with my Xserver - how can I fix this + ?" + A: + + Some PS Type1 do not work out-of-the-box with all PS Type1 font + engines - some will work with the Adobe font engine (used in Solaris + Xsun) but not with the X.org font engine (or the other way round) or + the fonts are simply broken. The following procedure will try to fix + this problem: Get the "type1fix" perl script the TeXTrace package + ([250]http://www.inf.bme.hu/~pts/textrace-latest.tar.gz) and run it + over the fonts. Example 1 (filter fonts): +# Broken PFA fonts are in broken_fonts/ +% mkdir fixed_fonts ; cd fixed_fonts +% for i in ../broken_fonts/*.pfa ; do + echo " ------- $i" ; + type1fix.pl --ofmt=pfa --infile=$i --outfile=$(basename ${i}) ; + done + + Example 2 (filter fonts and convert them to PFB on-the-fly; do not + forget to update fonts.scale and run "mkfontdir" (to update fonts.dir) + ; systems which use the Adobe font engine (like Solaris/Xsun) may + require to run "makepsres", too): +# Broken PFA fonts are in broken_fonts/ +% mkdir fixed_fonts ; cd fixed_fonts +% for i in ../broken_fonts/*.pfa ; do + echo " ------- $i" ; + type1fix.pl --ofmt=pfb --infile=$i --outfile=$(basename ${i%.pfa}.pfb) ; + done + + Q: + + I can't get it working. I have set ${DISPLAY} correctly to point to + the Xprt display and... ... What is going wrong ? + A: + + Do not set ${DISPLAY} to the Xprt server. You still need your normal + Xserver for your video card - Xprt is only for your printer(s). + Applications look up Xprt servers via the ${XPSERVERLIST} env var, NOT + via the ${DISPLAY} env var. + Q: + + When I try to print via Xprint I get the message "Fatal server error: + unable to exec '/usr/bin/lp'". What is going wrong here ? + A: + + This usually means that the spooler application "/usr/bin/lp" could + not be launched. This is usually the result when /usr/bin/lp does not + exist or cannot be executed (for example, shell scripts without the +x + (executable) flag etc.). + Q: + + The Solaris Xprt prints some error messages about PostScript fonts + like "FOOBAR not found, using Courier. CMEX0123 not found, using + Courier." etc. and uses "Courier" instead of these fonts... + A: + + Cause: The Solaris (Adobe-based) PostScript font engine requires a + "PostScript resource database" file named "PSres.upr" to use the + PostScript fonts correctly. + + Solution: Create the missing PSres.upr database. + + Procedure 5. Steps to create the missing "PSres.upr" file (task list): + 1. Go to the location where the matching fonts are installed (we're + using /home/sanja/mathml_fonts/tex_cmps/Type1/ in this example): +% cd /home/sanja/mathml_fonts/tex_cmps/Type1// + 2. Create "PSres.upr" using the "makepsres" command. +% makepsres + 3. Validation: Make sure the file has been created: +% ls -l PSres.upr + 4. Restart Xprt server(s): +% /etc/init.d/xprint restart + 5. Restart application which uses these fonts + + References: + * makepsres(1) manual page + * [251]bugzilla.mozilla.org 120560 ("Solaris Xsun does not like + CMEX10/CMSY10 Type1 fonts") + * [252]bugzilla.mozilla.org 142718 ("Document how to get the MathML + fonts to work on Solaris") + + Q: + + "Xprt refused to start, complaining about a missing dir + (/etc/X11/xserver/C/print/ directory)... I created it by hand (empty) + and started Xprt but it still does not work properly..." + A: + + Xprt expects some config data in this directory. Just making it an + existing but empty dir will work around the error message but will not + result in a properly working Xprt since it has no (usefull) builtins + which would make it possible to run the binary without the config + data. Your X11 binary distribution should always come with the config + data (for example /usr/openwin/server/etc/XpConfig/ on Solaris) or you + will not be able to use Xprint (however it is possible to copy the + config data from another system :) BTW: Source for the configs can be + found under xc/programs/Xserver/XpConfig/ + Q: + + My Linux system already shipps with a '/usr/X11R6/bin/Xprt'-binary. Do + I need the binary distribution from [253]http://xprint.mozdev.org/ ? + A: + + This depends on what is shipped with your Linux distribution. Please + check the "vendor" string of the Xprt server: +% Xprt :10 & +% xdpyinfo -display :10 | grep -i "vendor string" + + If this outputs a line like "vendor string: The XFree86 Project, Inc" + then you have the Xprt binary build from Xfree86 sources - which are + broken - even the newest version [I'll update this as soon as Xfree86 + shipps with a working version]. Xprt from Solaris, HP-UX and my own + builds (which identifies itself as "vendor string: xprint.mozdev.org" + for releases >= 007, older releases (e.g. <= 006) identify itself as + as "vendor string: The X.Org Group") are known to work proprtly. + Q: + + I am getting the error message "error opening security policy file + /usr/X11R6/lib/X11/xserver/SecurityPolicy". What does that mean ? + A: + + The policy file for the SECURITY extension cannot be found. This is + not serious unless you want to make use of features of the SECURITY + extensions (like treating clients as "untrusted", e.g. restrict their + access to certain Xserver resources). Normally the missing policy file + is a problem with your Unix/Linux X11 distribution; consult your + vendor where to get the missing file from. Alternatively you can get + the plain X11R6.6 security policy file from + [254]ftp://ftp.x.org/pub/R6.6/xc/programs/Xserver/Xext/SecurityPolicy + (copy it to the matching location - but be sure that you do not + overwrite any existing security policy file). + Q: + + I have modified the "HPLJ4family" [or "HPDJ1600C" etc.] printer model + to work with my PostScript printer, but when I print I get empty + places where some text should be - what am I doing wrong here ? + A: + + The "HPLJ4family" and "HPDJ1600C" models are PCL-only, check the + model-config spec + (${XPCONFIGDIR}/C/print/models/${MODEL_NAME}/model-config) - if the + "xp-ddx-identifier" attribute says something with "PCL" (like + "XP-PCL-MONO" etc.) in the value string then this model-config is for + the PCL-DDX only (e.g. their PMF fonts do not supply the neccesary + information (e.g. the "_ADOBE_POSTSCRIPT_FONTNAME" chunk is missing; + they only provide the "PCL_FONT_NAME" chunk) nor are these fonts + accessible via the PostScript-support in these printers. A solution is + to use the "PSdefault" model instead (and/or create your customized + own version of this model) - or look if there is a model-config + beginning with the same name and ending with "PS" (e.g. + "HPLJ4family-PS"). + Q: + + Xprt outputs warning messages like: + +Xp Extension: Can't load driver XP-PCL-MONO + init function missing +Xp Extension: Can't load driver XP-RASTER + init function missing + + What does that mean ? + A: + + Two possible problems: + 1. The requested driver is not supported by that version of Xprt. For + example Solaris 2.7 Xprt does not support XP-PCL-MONO nor the + XP-RASTER driver. Valid values for the "xp-ddx-identifier" + attribute in ${XPCONFIGDIR}/*/print/attributes/printers and/or + ${XPCONFIGDIR}/*/print/models/*/model-config are + + Solaris 2.7: XP-POSTSCRIPT and XP-PCL-COLOR + + Solaris >=2.8: XP-POSTSCRIPT, XP-PCL-COLOR, XP-PCL-MONO and + XP-RASTER + + HP-UX: XP-POSTSCRIPT, XP-PCL-COLOR, XP-PCL-MONO, XP-PCL-LJ3, + XP-PCL-DJ1200 and XP-RASTER + + xprint.mozdev.org release 007: XP-POSTSCRIPT and XP-RASTER + + xprint.mozdev.org release 008: XP-POSTSCRIPT, XP-PCL-COLOR, + XP-PCL-MONO, XP-PCL-LJ3 and XP-RASTER + + xprint.mozdev.org release >=2.0 (planned): XP-POSTSCRIPT, + XP-PCL-COLOR, XP-PCL-MONO, XP-PCL-LJ3, XP-RASTER, XP-PDF and + XP-SVGPRINT. + 2. There may be too many drivers loaded into one Xprt instance. By + default a single Xserver instance can only handle three screens - + and since one Xprint DDX maps to one Xserver screen this limit + applies to the number of loaded Xprt drivers, too. Starting with + xprint.mozdev.org release 008 the per-Xserver screen limit was + increased from "3" to "8" to avoid this issue... Workaround: Start + a 2nd instance of Xprt which handles the other drivers which do + not fit into the first instance. + + Q: + + Printing on Solaris with Mozilla/Eclipse [or any other Xprint client] + removes spaces between words. What is going wrong ? + A: + + Cause: This is a bug in the Solaris Xprint server binary + (/usr/openwin/bin/Xprt). Various bug reports have been filed, see + * [255]xprint.mozdev.org bug 3353 ("Solaris Xprt looses space when + rendering with '-monotype-arial-*'-fonts") + * [256]bugzilla.mozilla.org bug 199957 ("Solaris 8 Mozilla removes + spaces for text within ...") + + Solution: Solution: Please apply the following OS patches from + [257]http://sunsolve.sun.com/: + + Table 1. Solaris patches to fix [258]xprint.mozdev.org bug 3353 + ("Solaris Xprt looses space when rendering with + '-monotype-arial-*'-fonts") + Solaris 2.7 Solaris 2.8 Solaris 2.9 + SPARC x86 SPARC x86 SPARC x86 + [259]n/a [260]n/a [261]108652-73 [262]108653-62 [263]112785-21 + [264]112786-11 + +Note + + For Solaris 2.7 (both SPARC and x86 platforms) there are currently + [265]no patches available... ;-( + + Known workarounds: + * Remove the '-monotype-arial-*' fonts from the font path + * Use an alternate Xprint server like available in the "GISWxprint" + package (this package is identical to the "GISWxprintglue" package + except that it uses a Xprint server build from xprint.mozdev.org + sources and not the /usr/openwin/bin/Xprt binary from Solaris) + * Mozilla-only: Adding + user_pref("print.xprint.font.rejectfontpattern", + "fname=-dt-.*;scalable=.*;outline_scaled=false;xdisplay=.*;xdpy=.*;ydpy=.*;xd +evice=.*|" + + "fname=-monotype-arial.*;scalable=.*;outline_scaled=.*;xdisplay=.*;xdpy=.*;yd +py=.*;xdevice=.*"); + to prefs.js works around the problem (see + [266]bugzilla.mozilla.org bug 199957 comment #6, too). + +Note + Note that this workaround may render various locales completly + inaccessible for printing since many of them only employ MonoType + fonts. + + Q: + + Installation of the "GISWxprint" / "GISWxprintglue" packages fails + like this: +# pkgadd -d /space/staging/xprint/GISWxprint.pkg +pkgadd: ERROR: no packages were found in + + Any idea what I am doing wrong ? + A: + + The target machine misses a patch to cure SunSolve bug 4025718 + ("pkginfo: allow greater than nine characters for PKG parameter + value"). Please apply the patches listed in the "Installation + Requirements" section in the README for the [267]GISWxprint / + [268]GISWxprintglue package. + Q: + + Printing page results in [two/three/.../16] leading blank pages, + followed by a correct (but offset) page. Any idea what is going wrong + ? + A: + + This symptom depends on the CUPS GhostScript driver used, however the + exact cause is currently unknown (see comments in [269]SuSE support + database entry SDB-2002/11/jsmeix_print-81-cups-formfeed ("Blank Pages + When Printing with CUPS")). + + Solution: Disable the CUPS accounting functionality in the cupsomatic + filter by changing the line + my $ps_accounting = 1; + + to + my $ps_accounting = 0; + + in the filter script /usr/lib/cups/filter/cupsomatic as the user root. + If you use /etc/foomatic/filter.conf, disable ps_accounting there. + + References: + * [270]SuSE support database entry + SDB-2002/11/jsmeix_print-81-cups-formfeed ("Blank Pages When + Printing with CUPS") + * [271]xprint.mozdev.org bug 4181 ("Two empty pages printed first") + * [272]bugzilla.mozilla.org bug 180602 comment #7 ("Printing page + results in 16 leading blank pages, followed by a correct, but + offset, page") + +5. Software development + + Q: [273]How does the X print server (Xprt) and the Xlib client side + differ from the "normal" video Xserver/video client side ? + + Q: [274]How can I get the printable area (e.g. the portion of the page + on which the printer is physically capable of placing ink) of + the paper after I have chosen a paper ? + + Q: [275]Do "offscreen" pixmaps work on Xprt ? + Q: [276]How can I get the DPI value for the current Xprt server ? Can + I use the values from "xdpyinfo" ? + + Q: [277]Why does Xprt not offer the MIT-SHM protocol extension ? + Q: [278]Does Xprint/Xprt support font rotation ? + Q: [279]When I render something on my window and call XpStartPage all + the rendered stuff is gone, I only get a white, empty paper. + What is going wrong here ? + + Q: [280]What is XpStartDoc for ? + Q: [281]How does the XLFD for printer-builtin fonts look like ? / How + can I find/identify printer-builtin fonts ? + + Q: [282]How can I scale images using the Xprint API ? + Q: [283]Can I pass my own PostScript code (fragment) to the print + spooler instead of letting Xprt's PostScript DDX generate it ? + + Q: [284]When I use XpPutDocumentData I get a BadValue X protocol + error. Any idea what am I doing wrong ? + + Q: [285]How do I use the XprintUtil library ? + Q: [286]Why does the XGetImage not work for Xprt ? + Q: [287]How to print with Xt/Athena widgets ? + Q: [288]How to print with Xt/Motif widgets ? + Q: [289]What are the differences between normal display and Xprint + display ? + + Q: [290]How do I scale images ? + Q: [291]libXp Image scaling vs. max. request size ? + Q: [292]How can I use XprintUtils ? + Q: [293]How do I calculate the DPI values for Xprt DDX screens ? + Q: [294]How do I find scaleable fonts ? + Q: [295]How do I find printer-builtin fonts ? + Q: [296]The XLFD for Printer-builtin fonts look like bitmap fonts - is + that bad ? + + Q: [297]When printing using the XawPrintShell/XmPrintShell print + shells my PostScript output is always corrupt. What am I doing + wrong ? + + Q: [298]When printing using the XawPrintShell/XmPrintShell print + shells I always get a grey/dithered background on paper. Any + idea how to change that to "white" ? + + Q: [299]Are there any caveats/suggestions when printing via Xt/Motif2 + widgets ? + + Q: [300]Can I change the paper size/resolution/page orientation/etc. + when printing using the XawPrintShell/XmPrintShell print shells + ? + + Q: + + How does the X print server (Xprt) and the Xlib client side differ + from the "normal" video Xserver/video client side ? + A: + + The X Print Service expands on the traditional X-Server and Xlib world + in the following ways: + 1. Most obvious is the use of "print ddx drivers" instead of "video + ddx drivers". While a video ddx driver modifies pixels in a video + frame buffer, a print ddx driver generates "page description + language ([301]PDL)" output (such as PCL, PDF, PostScript, + SVGprint, etc.) or sends the print rendering instructions to a + platform-specific print API (like Win32/GDI). + Once a print ddx driver generates [302]PDL output, it can be sent + to a spooler (using XpuStartJobToSpooler) or retrieved by the + client (to implement functionality like "print-to-file" with + functions such as XpuStartJobToFile). + 2. Since printers support "paged" output, unlike video, a portion of + the Xp Extension supports APIs to delineate printed output into a + print job. + A "print job" in Xprint consists of one or more "documents" which + itself consists of one or more "pages". + A client starts a job sequence with XpStartJob and ends it with + XpEndJob or XpCancelJob to cancel the generation of the current + print job. Any document-specific print attributes MUST be changed + before XpStartJob. + A client starts a document sequence with XpStartDoc and ends it + with XpEndDoc or XpCancelDoc to cancel the generation of the + current document. Any document-specific print attributes MUST be + changed before XpStartDoc or after XpEndDoc (to affect the + following document). + A client starts a page sequence with XpStartPage and ends it with + XpEndPage or XpCancelPage to cancel the generation of the current + page. Any page-specific print attributes MUST be changed before + XpStartDoc or after XpEndDoc (to affect the following document). + 3. Since printers have extensive capabilities, another portion of the + Xp Extension supports APIs to manipulate "print contexts". + Once a printer is selected using the Xp Extension API, a print + context to represent it can be created. A print context embodies + the printer selected - it contains the printer's default + capabilities, selectable range of capabilities, printer state, and + generated output. Some "attributes" within the print context can + be modified by the user, and the X-Server and print ddx driver + will react accordingly. For example, the attribute + "content-orientation" can be set to "landscape" or "portrait" (if + the printer supports these values - which can be queried using the + Xprint API as well). + 4. Since printers can have "built in" fonts, the Xp Extension in the + X-Server works with the print ddx drivers to make available (for + printing only) additional fonts on a per print context basis. + When a print context is created and set for a given printer, the X + font calls may be able to access additional printer fonts. To do + this (typically), the X-Server must have access to "printer metric + files" (.pmf) that describe at minimum the metrics of the built in + fonts. + 5. Since printers can have "built in" fonts, the Xp Extension in the + X-Server works with the print ddx drivers to make available (for + printing only) additional fonts on a per print context basis. + When a print context is created and set for a given printer, the X + rendering calls use the resolution of the current page (or if not + given, the resolution of the current document or the current + resolution for this print job). The screen's resolution is INVALID + in this case. XprintUtils has the functions XpuGetResolution (to + get the current print resolution (searching page, document and job + level attributes (in that order)), XpuSetPageResolution (to set + the current page resolution), XpuSetDocResolution (to set the + current document resolution), XpuGetResolutionList (to get the + list of all resolutions supported by this printer) and + XpuFindResolution (to find a resolution in the list returned by + XpuGetResolutionList) to support getting/setting/queries of + resolutions. + When a print context is created and set for a given printer, the X + image rendering calls (such as XPutImage support scaling of + images. The Xp Extension API provides the functions + XpSetImageResolution and XpSetImageResolution to set and get an + image resolution. The scaling factor for an image printed on the + paper can simply calculated via scaling_factor = + curr_print_resolution_resolution / image_resolution where + curr_print_resolution_resolution is the value returned by a + function such as XpuGetResolution, image_resolution the resolution + passed to XpSetImageResolution and scaling_factor the resulting + scaling factor. Note that XpSetImageResolution will failure + (=FALSE) when the print DDX (for example the RASTER DDX) does not + support scaling. In that case the application has to scale the + image manually. + + Q: + + How can I get the printable area (e.g. the portion of the page on + which the printer is physically capable of placing ink) of the paper + after I have chosen a paper ? + A: + + The XpGetPageDimensions function returns the printable area and other + information about the current page geometry. Note that the page + geometry changes when the page attributes such as content-orientation + or default-medium are changed by the application. + Q: + + Do "offscreen" pixmaps work on Xprt ? + A: + + Yes, "offscreen" pixmaps are working on Xprt. + Q: + + How can I get the DPI value for the current Xprt server ? Can I use + the values from "xdpyinfo" ? + A: + + The Xprt screen resolution defines only the maximum resolution + configured for the matching DDX, the printers real DPI is obtained via + an another API (XprintUtil has a bunch of functions to get/set the + document/page resolution, see XpuGetResolutionList, + XpuFreeResolutionList, XpuGetResolution, XpuSetPageResolution, + XpuSetDocResolution and XpuFindResolution). + Q: + + Why does Xprt not offer the MIT-SHM protocol extension ? + A: + + The MIT-SHM protocol extension is partially (XShmPutImage would work, + but others like XShmGetImage and esp. XShmCreatePixmap cannot be + implemented properly) incompatible to the way how some of the Xprint + DDX are implemented. For example the PostScript, PDF, PCL and SVGprint + DDX do not rasterize any images on their side - instead they convert + the stream of X11 rendering instructions into the matching [303]PDL + instruction stream. Only the printer side will (finally) do the + rasterisation of the output image. This is the basically the same + reason why [304]XGetImage does not work for those DDXs - and functions + such as XShmCreatePixmap would be useless since drawing operations on + the shared pixmap would not be applied to the application (e.g. Xprint + client) as well. + Q: + + Does Xprint/Xprt support font rotation ? + A: + + Yes - Xprint/Xprt supports font rotation at any angle via the matrix + XLFD enhancement (this even works for printer-builtin fonts !!). For + details see the paper "New Font Technology for X11R6" by Nathan Meyers + (a copy can be found in the Xprint.org source tree under + xc/doc/hardcopy/XLFD/x11r6_fonts_94_paper.PS.gz) + + Short: The transformation-matrix for rotation can be calculated like + this: ++-- --+ +| cos(angle) sin(angle)| +| | +|-sin(angle) cos(angle)| ++-- --+ + + Examples: + 1. the following code fragment obtains a 180 degree rotated font + (matrix [-1 0 0 -1]): + ... = XLoadQueryFont(..., "-adobe-courier-bold-r-normal--*-[~24 0 0 ~24]-0-0- +m-*-iso8859-1"); + 2. the following code fragment obtains a 90 degree rotated font + (matrix [0 1 -1 0]): + ... = XLoadQueryFont(..., "-adobe-courier-bold-r-normal--*-[0 24 ~24 0]-0-0-m +-*-iso8859-1"); + + Future versions of Xprint will support the [305]STSF font API which + supports matrix transformations as well. + Q: + + When I render something on my window and call XpStartPage all the + rendered stuff is gone, I only get a white, empty paper. What is going + wrong here ? + A: + + Remember the rule that "only those drawings are printed on the paper + which were rendered between XpStartPage and XpEndPage". XpStartPage + clears the window you passed as argument, e.g. it creates a new, blank + sheet of paper where you can do your rendering stuff on. XpEndpage + then pushes the "paper sheet" to the stash of papers from the document + in process. + +Tip + + If you want to render something once for multiple or all pages: Render + on a offscreen pixmap and copy (with XCopyArea) the content to the + "paper" drawable (after calling XpStartPage) - XpStartpage only + affects the window passed as parameter. + + Q: + + What is XpStartDoc for ? + A: + + ISO 10175 and some advanced printing systems by IBM and HP had set + forth the standard that a "Job" is made up of one or more "Documents", + and each document is made up of one or more "Pages". Xprint was + designed that in a true ISO 10175 environment/implementation (lp(1) on + steroids, and with an API), Xprt can actually learn about all printers + and their capabilities though API's into the printer subsystem (vs. + using config files), map Job/Doc/Page directly into ISO 10175 + equivalents, and use APIs to view job status and kill jobs (vs. + cancel(1), lpcancel(1), lpstatus(1)). Because most applications of the + day are only printing one document per job, XpStartPage was designed + that it generates a "synthetic" XpStartDoc if it has not been called + yet. + Q: + + How does the XLFD for printer-builtin fonts look like ? / How can I + find/identify printer-builtin fonts ? + A: + + There is no special XLFD scheme for printer-builtin fonts. Instead the + xp-listfonts-modes-supported is used to define whether XListFonts and + co. return printer-builtin fonts or not. By default the attribute + looks is set to *xp-listfonts-modes-supported: + xp-list-internal-printer-fonts xp-list-glyph-fonts which defines thaht + XListFonts and co. return both printer-builtin and normal fonts. + Removing xp-list-internal-printer-fonts will make printer-builtin + fonts disappear, removing xp-list-glyph-fonts will make normal glyph + fonts disappear from font lists. + Q: + + How can I scale images using the Xprint API ? + A: + + XXX + Q: + + Can I pass my own PostScript code (fragment) to the print spooler + instead of letting Xprt's PostScript DDX generate it ? + A: + + XXX + Q: + + When I use XpPutDocumentData I get a BadValue X protocol error. Any + idea what am I doing wrong ? + A: + + XXX + Q: + + How do I use the XprintUtil library ? + A: + + XXX + Q: + + Why does the XGetImage not work for Xprt ? + A: + + There are at least three reasons why XGetImage does not work for Xprt: + 1. Most of the Xprt DDX implementations do not render itself on any + bitmaps like the framebuffer(=video) DDX do, they translate the + rendering commands into the matching commands of the printer + language (it is technically possible to implement such support for + XGetImage even for those drivers - but there are more reasons:) + 2. Xprt usually operates at high resolutions which results in very + large dimensions. If a client would request the 24bit TrueColor + bitmap data for a whole DIN-A4 page at 2400 DPI a data chunk of + ~173 megabytes would be the response. This would be more or less a + DOS(=Denial of Service) for either the client, the network and/or + the server. + 3. The printer-builtin fonts only provide metrics information - there + is no real "outline" information at that time (these fonts reside + only in the printer's ROM and are only available at the time the + printer rasterizes the incoming [306]PDL (e.g. PCL/PostScript) + data stream) which could be used to rasterize the matching glyphs + (which means: A XGetImage implementation would return image data + but glyphs rendered using the printer-builtin fonts would be + missing). + + Q: + + How to print with Xt/Athena widgets ? + A: + + There are two examples in the Xprint.org source tree which demonstrate + how to use Xprint using Athena widgets: + 1. xc/programs/xphelloworld/xpawhelloworld/ contains a simple demo + application which prints a Athena widget using the XawPrintShell + widget class. + 2. xc/programs/xphelloworld/xpxthelloworld/ contains a simple demo + application which prints a Athena widget without using a special + print widget class (however, if possible a print shell such as + XawPrintShell or XmPrintShell should be used since this is the + easier way to add print support to an Athena application). + + Q: + + How to print with Xt/Motif widgets ? + A: + + The Xprint.org source tree contains the xpxmhelloworld + (xc/programs/xphelloworld/xpxmhelloworld/) application to demonstrate + how to print using the Motif2 toolkit. + Q: + + What are the differences between normal display and Xprint display ? + A: + + XXX + Q: + + How do I scale images ? + A: + + XXX + Q: + + libXp Image scaling vs. max. request size ? + A: + + XXX + Q: + + How can I use XprintUtils ? + A: + + XXX + Q: + + How do I calculate the DPI values for Xprt DDX screens ? + A: + + XXX + Q: + + How do I find scaleable fonts ? + A: + + XXX + Q: + + How do I find printer-builtin fonts ? + A: + + XXX + Q: + + The XLFD for Printer-builtin fonts look like bitmap fonts - is that + bad ? + A: + + No, this is not "bad". The XLFD of a printer-builtin font only looks + like a bitmap font since the *.pmf (Printer metrics file) format is a + PCF file format variant (the DPI values in the XLFD AFAIK specifies + the resolution which was used for generating the metrics) - however + this does not change the fact that the printer-builtin fonts are + outline scaleable fonts these fonts reside in the printer's ROM). + Q: + + When printing using the XawPrintShell/XmPrintShell print shells my + PostScript output is always corrupt. What am I doing wrong ? + A: + + Make sure the widgets (such as text input widgets) have the (blinking) + cursor turned-off. Setting the XmNcursorPositionVisible, to False + usually solves the problem (for Motif2 widgets). Example: +... +XtSetArg(args[n], XmNcursorPositionVisible, False); +... + + Q: + + When printing using the XawPrintShell/XmPrintShell print shells I + always get a grey/dithered background on paper. Any idea how to change + that to "white" ? + A: + + XXX + Q: + + Are there any caveats/suggestions when printing via Xt/Motif2 widgets + ? + A: + + There are a couple of Xt resources which may likely differ from the + normal values (e.g. those values used for a video Xserver): + + Core class level + + XmNbackground resource + The application will probably want to set the + XmNbackground resource to "white" to match the default + paper color. + + XmNborderWidth resource + The application will probably want to set the + XmNborderWidth resource to "0" (usually the default + value) to avoid that a black border appears around the + widget. + + XmPrimitive class + + XmNshadowThickness and XmNhightlightThickness resources + The application will probably want to set + XmNshadowThickness and XmNhightlightThickness to "0" + (usually the default value) to avoid 3D border effects on + the printout (depends on application and author's + preference... :-)). + + XmText and XmTextField classes + + XmNcursorPositionVisible resource + The application will probably want to set + XmNcursorPositionVisible to False to avoid that the + cursor is visible on printouts (and to avoid problems + with some nasty implementation details which may cause + corrupted PostScript output). + + XmNscrollHorizontal and XmNscrollVertical resources + The application will probably want to set the + XmNscrollHorizontal and XmNscrollVertical resources to + False to suppress printing of scrollbars (on paper + "scrolling" is replaced with "pagination" except for rare + exceptions (like 1:1 WYSIWYG-printing)). + + XmNmarginWidth and XmNmarginHeight resources + The application will probably want to recalculate the + XmNmarginWidth and XmNmarginHeight resources based on the + (far) higher print resolution (or reverse: set them to + "0" - depending on what style matches the application + needs better...). + + XmLabel class + + XmNmarginTop, XmNmarginBottom, XmNmarginRight, XmNmarginLeft, + XmNmarginWidth, XmNmarginHeight and XmNalignment + resources + The application will probably want to use different value + for XmLabel class's XmNmarginTop, XmNmarginBottom, + XmNmarginRight, XmNmarginLeft, XmNmarginWidth, + XmNmarginHeight and XmNalignment resources. These + resources are mainly usefull when the widget holds a + border, highlight or shadow of some kind. If borders are + not to be transferred there is no real need to transfer a + margin either. + + Q: + + Can I change the paper size/resolution/page orientation/etc. when + printing using the XawPrintShell/XmPrintShell print shells ? + A: + + Yes, it is allowed to change the page attributes in the page setup + callback (e.g. XawNpageSetupCallback or XmNpageSetupCallback) since + this callback is always called before XpStartPage (for the 2nd and + following pages: between XpEndPage and XpStartPage). Note that + changing page attributes will automagically update the print shell + widget size (e.g. attributes XawNminX, XawNminY, XawNmaxX and XawNmaxX + (XawPrintShell) or XmNminX, XmNminY, XmNmaxX and XmNmaxX + (XmPrintShell) are updated based on events send by the Xp Extension + and then the print shell is resized based on the new values + (XawPrintShell is slightly more flexible since the size mode can be + defined using the XawNlayoutMode attribute)). + +Known bugs + + Problem [307]Xprt build from Xfree86 sources is completely broken + and unuseable. + + Problem [308]The code which matches XLFD names to PS Type1 font + names is case-sensitive in Xprts build from X.org + X11R6.5.1/X11R6.6 and the current Solaris Xprt. This may + cause that the PS DDX refuses to download PS Type1 fonts. + + Problem [309]Xprt build from X11R6.5.1/X11R6.6 sources and + Solaris's version of Xprt can only download PFA (PS ASCII + font) fonts which ends of the ending "*.pfa". + + Problem [310]There is an issue how the Linux and Solaris Xprt + handles the "copy-count" of a print job. The result may + be that a job with n copies of a document end-up in n + jobs with n copies (usually equals to n^2 copies). + + Problem [311]Xprt build from Xfree86 sources is completely broken and + unuseable. + + Problem [312]The code which matches XLFD names to PS Type1 font names + is case-sensitive in Xprts build from X.org X11R6.5.1/X11R6.6 + and the current Solaris Xprt. This may cause that the PS DDX + refuses to download PS Type1 fonts. + + Problem [313]Xprt build from X11R6.5.1/X11R6.6 sources and Solaris's + version of Xprt can only download PFA (PS ASCII font) fonts + which ends of the ending "*.pfa". + + Problem [314]There is an issue how the Linux and Solaris Xprt handles + the "copy-count" of a print job. The result may be that a job + with n copies of a document end-up in n jobs with n copies + (usually equals to n^2 copies). + + Problem + + Xprt build from Xfree86 sources is completely broken and unuseable. + Solution + + Build Xprt from the CVS tree at [315]http://xprint.mozdev.org/ or the + X.org X11R6.5.1 sources (note that the client side Xprint extension + library ("libXp.so") from Xfree86 is not broken and do not need to be + replaced). + Problem + + The code which matches XLFD names to PS Type1 font names is + case-sensitive in Xprts build from X.org X11R6.5.1/X11R6.6 and the + current Solaris Xprt. This may cause that the PS DDX refuses to + download PS Type1 fonts. + Solution + + Patch available, I am looking for a way to get the patch into the X11 + and Solaris source trees... + Problem + + Xprt build from X11R6.5.1/X11R6.6 sources and Solaris's version of + Xprt can only download PFA (PS ASCII font) fonts which ends of the + ending "*.pfa". + Solution + + Either convert PFB (PS Type 1 binary font) to PFA format and adjust + the fonts.dir and fonts.scale file or get a patch for the sources. I + am looking for a way to get the patch into the X11 and Solaris source + trees (the fixed version can download both PFA/PFB fonts in PFA format + and even handles non-standard file extensions). + Problem + + There is an issue how the Linux and Solaris Xprt handles the + "copy-count" of a print job. The result may be that a job with n + copies of a document end-up in n jobs with n copies (usually equals to + n^2 copies). + Solution + + Xprt build from xprint.mozdev.org sources has been fixed in release + 007, see [316]xprint.mozdev.org bug 1378 ("PS DDX creates n^2 copies + of a job instead of n copies") and [317]bugzilla.mozilla.org 140030 + ("Setting number of copies causes too many copies to print") for + details. Solaris 2.7 Xprt still suffers from this issue... ;-( + +Unanswered questions + + (My small ToDo list what I will write soon; 379 items missing... =:-) + Email me if you want one of these answered "now" and/or to contribute + an answer... :) + How do I create a model-config for my printer ? + How can I customize a model-config for my site/machine ? + Which attributes/values can be set in a model-config ? + Why can't I set default values (for my {paper size, resolution, ...}) + in the model-config ? + Should I add the fonts in the model-config dir to the Xserver's font + path ? + What are the fonts in the model-config dir for ? + Can I use a font server for all fonts instead of passing then directly + to the Xprint server ? + Does the Xprint PostScript driver do full rasterisation of the print + job ? + Is it possible to prepare a printer config entry so that the PS output + is piped to "ps2pdf" and will produce directly a PDF file? It would be + nice to have mozilla directly producing PDF files when printing. + Problem: I have changed the Xprt config - but "xplsprinters -l" + (or any other Xprint application) does not show the change. + Any idea what I am doing wrong ? + How can I add a font path to Xprt ? + Why does "xset +fp path_to_font" not work in some cases ? + How can I get a "core"-dump when Xprt crashes ? + How can I debug Xprt (hint: use "-audit 4") ? + How can I debug Xprt with Sun Workshop (hint: "check -access") ? + How can I check whether Xprint is "active" ? / How can I verify that a + Xprint is working ? + +Acknowledgements + + We'd like like to express their gratitude to the whole community for + providing insightful answers to innumerable questions. In particular, + the following people (listed alphabetically) have contributed to this + FAQ (apologies, in advance, if anyone has been forgotten): + + Alan Coopersmith <[318]alan.coopersmith@sun.com> + Giuseppe Ghibò <[319]ghibo@mandrakesoft.com> + Thomas Gilg <[320]thomas_gilg@hp.com> + Jay Hobson <[321]jay.hobson@sun.com> + Masaki Katakai <[322]katakai@japan.sun.com> + Simon Montagu <[323]smontagu@smontagu.org> + Drew Parsons <[324]dparsons@debian.org> + (and many many others) + +References + + 1. mailto:roland.mainz@nrubsig.org + 3. http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/doc/hardcopy/XPRINT/Xprint_FAQ.html + 4. http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/doc/hardcopy/XPRINT/Xprint_FAQ.txt + 5. http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/doc/hardcopy/XPRINT/Xprint_FAQ.xml + 144. http://xprint.mozdev.org/ + 145. http://packages.qa.debian.org/x/xprint-xprintorg.html + 146. http://xprint.mozdev.org/ + 147. http://xprint.mozdev.org/download.html + 148. http://xprint.mozdev.org/ + 149. http://xprint.mozdev.org/ + 150. http://xprint.mozdev.org/list.html + 157. http://stsf.sourceforge.net/ + 159. http://xprint.mozdev.org/bugs/show_bug.cgi?id=2261 + 160. http://xprint.mozdev.org/ + 161. http://ttf2pt1.sourceforge.net/download.html + 164. http://xprint.mozdev.org/ + 165. http://www.opengroup.org/cde/ + 166. http://www.mozilla.org/projects/xprint/ + 167. http://www.mozdev.org/ + 186. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=171174 + 187. http://xprint.mozdev.org/ + 189. http://xprint.mozdev.org/ + 192. http://xprint.mozdev.org/bugs/show_bug.cgi?id=5092 + 214. http://www.adobe.com/type/main.html + 215. http://www.adobe.com/type/eurofont.html + 216. ftp://ftp.adobe.com/pub/adobe/type/win/all/ + 218. http://xprint.mozdev.org/bugs/show_bug.cgi?id=2092 + 219. http://xprint.mozdev.org/bugs/show_bug.cgi?id=2430 + 220. http://xprint.freedesktop.org/cgi-bin/bugzilla/enter_bug.cgi?product=xprint&component=Server%3A%2BConfig%3A%2Bmodel-configs + 221. http://xprint.freedesktop.org/cgi-bin/bugzilla/enter_bug.cgi + 246. http://packages.debian.org/stable/utils/type1inst.html + 247. http://packages.debian.org/stable/x11/ttmkfdir.html + 248. http://xprint.mozdev.org/ + 249. http://xprint.mozdev.org/bugs/show_bug.cgi?id=2475 + 250. http://www.inf.bme.hu/~pts/textrace-latest.tar.gz + 251. http://bugzilla.mozilla.org/show_bug.cgi?id=120560 + 252. http://bugzilla.mozilla.org/show_bug.cgi?id=142718 + 253. http://xprint.mozdev.org/ + 254. ftp://ftp.x.org/pub/R6.6/xc/programs/Xserver/Xext/SecurityPolicy + 255. http://xprint.mozdev.org/bugs/show_bug.cgi?id=3353 + 256. http://bugzilla.mozilla.org/show_bug.cgi?id=199957 + 257. http://sunsolve.sun.com/ + 258. http://xprint.mozdev.org/bugs/show_bug.cgi?id=3353 + 261. http://sunsolve.sun.com/pub-cgi/retrieve.pl?patchid=108652&collection=fpatches + 262. http://sunsolve.sun.com/pub-cgi/retrieve.pl?patchid=108653&collection=fpatches + 263. http://sunsolve.sun.com/pub-cgi/retrieve.pl?patchid=112785&collection=fpatches + 264. http://sunsolve.sun.com/pub-cgi/retrieve.pl?patchid=112786&collection=fpatches + 265. http://xprint.mozdev.org/bugs/show_bug.cgi?id=3353#c24 + 266. http://bugzilla.mozilla.org/show_bug.cgi?id=199957#c6 + 267. http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/packager/solaris/GISWxprint/README + 268. http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/packager/solaris/GISWxprintglue/README + 269. http://sdb.suse.de/en/sdb/html/jsmeix_print-81-cups-formfeed.html + 270. http://sdb.suse.de/en/sdb/html/jsmeix_print-81-cups-formfeed.html + 271. http://xprint.mozdev.org/bugs/show_bug.cgi?id=4181 + 272. http://bugzilla.mozilla.org/show_bug.cgi?id=180602#c7 + 305. http://stsf.sourceforge.net/ + 315. http://xprint.mozdev.org/ + 316. http://xprint.mozdev.org/bugs/show_bug.cgi?id=1378 + 317. http://bugzilla.mozilla.org/show_bug.cgi?id=140030 + 318. mailto:alan.coopersmith@sun.com + 319. mailto:ghibo@mandrakesoft.com + 320. mailto:thomas_gilg@hp.com + 321. mailto:jay.hobson@sun.com + 322. mailto:katakai@japan.sun.com + 323. mailto:smontagu@smontagu.org + 324. mailto:dparsons@debian.org Index: xc/doc/hardcopy/XPRINT/Xprint_FAQ.xml =================================================================== RCS file: xc/doc/hardcopy/XPRINT/Xprint_FAQ.xml diff -N xc/doc/hardcopy/XPRINT/Xprint_FAQ.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/doc/hardcopy/XPRINT/Xprint_FAQ.xml 21 Apr 2004 09:33:55 -0000 @@ -0,0 +1,4698 @@ + + + + + + +] > + + + + + +
+ + Xprint Frequently Asked Questions + + + + About this FAQ + + Archive-name: Xprint/FAQ + + + Version: 0.9 + + + Last-Modified: 2004/02/16 04:15:16 + + + Maintained-by: + Roland Mainz + roland.mainz@nrubsig.org + + + + The following is a list of questions that are frequently asked about + Xprint. + + + You can help make it an even better-quality FAQ by writing a short + contribution or update and sending it BY EMAIL ONLY to me. + A contribution should consist of a question and an answer, and increasing + number of people sends me contributions of the form "I don't know the + answer to this, but it must be a FAQ, please answer it for me". Please + read the FAQ first (including the item "Getting Help") + and then feel free to ask me if it is not in the FAQ. + + + Thanks! + + + + The latest Xprint FAQ and some other goodies can be obtained through http from + + http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/doc/hardcopy/XPRINT/Xprint_FAQ.html + + or + + http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/doc/hardcopy/XPRINT/Xprint_FAQ.txt + + (the DocBook/XML master source file is + + http://xprint.mozdev.org/lxr/http/source/xprint/src/xprint_main/xc/doc/hardcopy/XPRINT/Xprint_FAQ.xml + ). + + + + + Note that the FAQ has not been finished yet (nor is it half-finished...), + many items marked with "XXX" as the answer have still to be written (or have + to be copy&pasted from my item collection... :) + + + + + + + Frequently Asked Questions with Answers + + + General + + + + + What is "Xprint" ? + + + + + 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... + + + + + + + + Where can I get Xprint/Xprt from ? + + + + + 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). + + + + 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/. + + + + + + + + + + + What is "Xprt" ? + + + + + 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.). + + + + + + + + Where can I get help for problems with Xprint ? + + + + + 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. + + + + + + + + "Why do some people like Xprint ?" / "What are the advantages of Xprint ?" + + + + + + + + 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. + + + + + + + + + + + Why do some people dislike Xprint ? + + + + + There are a few common misconceptions about Xprint. + Let's take a look some of these "myths", some background - and the facts: + +
+ + + + + + + + Xprint prints just a XWD dump of the Xserver bitmap + + + + + + + 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. + + + + + + + + + + Xprint cannot handle non-'ISO Latin 1' chars + + + + + + + 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. + + + + + + + + + + Xprint uses a 1024x768 screen resolution to render the stuff on + the paper - therefore it will never be able to do high-resolution + stuff + + + + + + + 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. + + + + + + + + + + Xprint prints only graphics(=bitmap/gfx) fonts + + + + + + + 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 PostScipt Type1 fonts. However this + is the fallback - the last option used by Xprt. Used if + everything else fails. + But when someone does not pass any 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... + + + + + + + + + + Xprint does not support pages sizes larger than DIN-A4 + + + + + + + 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. + + + + + + + + + + Xprint does not support rotated text + + + + + + + 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... + + + + + + + + + + +
+
+
+ + + + + Does Xprint support anti-aliased fonts ? + + + + + 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. + + + + + + + + How can I check if Xprint is working and should be used ? + + + + + Check whether the ${XPSERVERLIST} env var is set or not. + If ${XPSERVERLIST} is set then Xprint is available and should be used. + + + + + + + + How can I view PS(=PostScript) files ? + + + + + + + + On Unix/Linux (general): + + + + GhostScript ("gs") and GhostView ("gv" and it's KDE- and Gnome-specific versions "kghostview" and "ggv") + + + + + + + + + + Solaris: + + + + /usr/dt/bin/sdtimage (DPS-based image viewer for CDE) + + + + + /usr/openwin/bin/pageview (DPS-based image viewer for OpenWindows) + + + + + + + + + + + + + + How can I view PCL files ? + + + + + XXX - xprint.mozdev.org bug 2261 + has been filed for that issue. + + + + + + + + + How does Xprt find fonts ? + + + + + + 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 + + + + + + + + + + + How can I print TrueType fonts with Xprint ? + + + + + + + + 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__mansuffix__) + 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... + + + + + + + + + + + What does "DDX" mean ? + + + + + "DDX" is a short term for "Device Dependent X" - the device-specific layer + of a Xserver ("DIX"(="Device Independent X") is the counterpart). + + + + + + + + What does "DIX" mean ? + + + + + "DIX" is a short term for "Device Independent X" - the non-device specific + code of a Xserver ("DDX"(="Device Dependent X") is the counterpart). + + + + + + + + What does "PDL" mean ? + + + + + "PDL" is a short term for "Page Description Language". Examples for PDLs are + PostScript, PCL, PDF and SVGprint. + + + + + + + + I have twenty printers installed on my system - but Xprt only shows two + screens. Where are all the other printers ? + + + + + 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). + + + + + + + + Which platforms support Xprint ? + + + + + 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/. + + + + + + + + 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 ? + + + + + 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. + + + + + + + + Which spelling is correct - "Xprint", "XPrint", "Xprinter" or Xprt" ? + + + + + "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). + + + + + + + + Which applications support Xprint ? + + + + + There are various applications which support Xprint: + + + + Motif/LessTif (full framework incl. special widgets like XmPrintShell) + + + + + Common Desktop Environment (CDE) 2.x + + + + + Mozilla + + + + + Eclipse + + + + + KDE/Qt support is comming is planned for the end of Dec/2003 + + + + + StarOffice 5.x + + + + + etc. + + + + + + + + + + + Is "Xprint" "mozilla"-only (I saw that it's hosted by mozdev.org) ? + + + + + No, Xprint is a general-purpose print API based on the X11 API used by + many applications (mozdev.org is just + hosting the development area, but this does not mean the project is limited to mozilla... + :)). + + + + + + + + Under which license is the source code from xprint.mozdev.org distributed under ? + + + + + That's the plain "MIT" license, the same as used by Xfree86.org 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. + + + + +
+ + +Usage + + + + + How do I configure Xprint on the client side ? + + + + + 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 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). + + + + + + + + + + + + + How do I start Xprt ? + + + + + + + + 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... + + + + + + + + + + How can I get a list of printers managed by Xprint ? + + + + + 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 + comment= + 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 + + + + + + + + + + + + How can I start Xprt at boot time ? + + + + + "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. + + + + + + + + How can I start Xprt per-user ? + + + + + "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. + + + + + + + + How can I start Xprt only for one application ? + + + + + 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. + + + + + + + + How can I filter the font path which should be passed to Xprt for + certain fonts ? + + + + + XXX + + + + + + + + How can I manage access control to the Xprt server ? + + + + + 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__mansuffix__)) + and/or per-machine (using "xhost" (see xhost__mansuffix__) and/or + /etc/X<dpy>.hosts (<dpy> == display number, + e.g. /etc/X0.hosts for display 0) (see Xserver__mansuffix__)) + Consult manual pages + Xsecurity__miscmansuffix__, + xhost__mansuffix__, + Xserver__mansuffix__ + etc. for further details. + + + + + + + + How can I log access to the Xprt server ? + + + + + Logging access to Xprt can be done using the standard Xserver auditing, + see the Xserver__mansuffix__ + manual page, option "-audit" + + + + + + + + Does it require "root" permissions to use Xprt/Xprint ? + + + + + 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). + + + + + + + + How can I see the attributes of a printer managed by Xprint ? + + + + + "xplsprinters -printer myprinter004 -l" will do the job for printer + "myprinter004". + + + See + xplsprinters__mansuffix__ + for futher usage and a description of the output. + + + + + + + + How can I list the font path used by a Xprt server ? + + + + + 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). + + + + + + + + + + "xset q" lists all model-specific font dirs (like + PRINTER:/myxpcfg/C/print/models/SPSPARC2/fonts/") - is that a bug ? + + + + + 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. + + + + + + + + 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 ?! + + + + + "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: + + + xprint.mozdev.org bug 5092 ("[PS2PDFspooldir-GS] RFE: Add printer model which sends PDF jobs to /tmp/Xprintjobs/") + + + + + + + + + + How can I forward Xprint services when logging-in via ssh to another machine ? + + + + + 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. + + + Login to a remote host using slogin (assuming there is only one + Xprint server listed in <envar>XPSERVERLIST</envar>) + + % 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}" + + + + Login to a remote host using slogin (assuming there are multiple + Xprint servers listed in <envar>XPSERVERLIST</envar>) + + 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}" + + + + + + + + + + +Configuration + + + + + How do I change the defaults for double-sided/single-sided/etc. + printing ? + + + + + 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. + + + + + + + + + + + + + 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) ? + + + + + 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. + + + + + + + + + + + + + How do I change the default printer resolution ? + + + + + 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. + + + + + + + + + + + + + How do I change the default settings for "portrait"/"landscape"/"seascape" (=page orientation) ? + + + + + 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. + + + + + + + + + + + + + How can I prevent Xprt from using any bitmap(=gfx) fonts ? + + + + + 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. +
+ 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 + + + +
+ + +
+
+
+ + + + + I want only my manually added printers managed by Xprint. How can I + prevent Xprt from looking-up the printer names automatically ? + + + + + 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". + + + + + + + + How can I specify an own program/script to enumerate the printers on my system ? + + + + + 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. + + + + + + + + Which program is used by default by Xprt to enumerate the printers on my system ? + + + + + 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). + + + + + + + + + + + + + Where can I get more PostScript Type1 fonts from ? + + + + + Some sources: + + + + Adobe: + + + + + Commercial fonts: + http://www.adobe.com/type/main.html + + + + + Free Euro font: + + + + Single-glyph (e.g. it contains only the euro char) euro font: + http://www.adobe.com/type/eurofont.html or + ftp://ftp.adobe.com/pub/adobe/type/win/all/ + ("eurofont.exe" can be unzipped using "unzip") + + + + + ISO8859-15: + XXX - WANTED!! + + + + + + + + + + + Solaris shipps with various PS Type 1 fonts: + + + + Arabic: + /usr/openwin/lib/locale/ar/X11/fonts/Type1/ + (fonts.dir and fonts.scale missing, maybe they miss the + presentation forms a&b, too [unconfirmed]) + + + + + ISO-8859-13 (Latin 8): + /usr/openwin/lib/locale/iso_8859_13/X11/fonts/Type1/ + + + + + ISO-8859-5 (Latin 5): + /usr/openwin/lib/locale/iso_8859_9/X11/fonts/Type1/ + + + + + ISO-8859-8/Hebrew: + /usr/openwin/lib/locale/iso_8859_8/X11/fonts/Type1 + (BROKEN, even "type1fix" cannot fix them. Use the hebrew fonts from + + + broken-link-/PS_Type1_iso8859-8.tar.gz) + + + + + ISO-8859-7/Modern greek: + /usr/openwin/lib/locale/iso_8859_7/X11/fonts/Type1/ + + + + + ISO-8859-5/Cryrillic: + /usr/openwin/lib/locale/iso_8859_5/X11/fonts/Type1/ + + + + + ISO-8859-4 (Latin 4): + /usr/openwin/lib/locale/iso_8859_4/X11/fonts/Type1/ + + + + + ISO-8859-2 (Latin 2): + /usr/openwin/lib/locale/iso_8859_2/X11/fonts/Type1/ + + + + + ISO-8859-1 (Latin 1) and Symbol fonts: + /usr/openwin/lib/X11/fonts/Type1/ + + + + + + + + + + + + + + + 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/)) ? + + + + + 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. + + + + + + + + Can I use the fontserver ("xfs") with Xprt ? + + + + + 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!) + + + + + + + + What is a "model-config" ? + + + + + 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). + + + + + + + + + + + Where can I store the default values for printers ? + + + + + XXX + + + + + + + + How can I create my own model-config ? + + + + + XXX + + + + + + + + How can I create my own PMF "fonts" ? + + + + + 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. + + + + + + + + Where can I get more model-configs from ? + + + + + If you miss a model-config for your printer please open a bug/RFE at + + http://xprint.freedesktop.org/cgi-bin/bugzilla/enter_bug.cgi?product=xprint&component=Server%3A+Config%3A+model-configs + (e.g. http://xprint.freedesktop.org/cgi-bin/bugzilla/enter_bug.cgi, product "Xprint", component + "Server Config: model-configs"). + + + + + + + + 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 ? + + + + + 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/ + + + + + + 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. + + + + + + + + + + Are config files and/or the PMF fonts architecture dependent ? + + + + + 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. + + + + + + + + Can I localise my Xprint/Xprt configuration (l10n) ? + + + + + 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/attributes/*", + "${XPCONFIGDIR}/${LANG}/print/models/*/model-config") + + + + + "Xprinters" (list of printers): + If there is a locale-specific ${XPCONFIGDIR}/${LANG}/Xprinters present + it will be used instead of ${XPCONFIGDIR}/C/Xprinters (e.g. values set + in ${XPCONFIGDIR}/C/Xprinters will be ignored and the values from + ${XPCONFIGDIR}/${LANG}/Xprinters will be used instead). + + + + + Xprt will determinate the locale which should be used based on the + ${LANG}-environment vaiable at startup time. If there is no such + variable set at that time LANG="C" is assumed. + + Note: + + Attribute values for paper names and orientation names refer to + builtin strings in the DDX code (which are itself based on + international standards), these cannot be changed to your own + "inventions" (it does it make sense to try to "localize" paper names - + "ISO-A4" is "ISO-A4" even in japanese/hebrew/german etc.). + Locale-spefific attribute pools can set their own, different values - + but only within the allowed range of values supported by the DDX and + printers's model-config. + + + + + + + + + + + + + Can I execute my own scripts to process the PostScript files generated + by Xprt ? + + + + + Yes, there are at least two possible solutions: + + + + Create your own model-config which uses a custom "xp-spooler-command" + value - the xprint.mozdev.org's + "PSspooldir" model config (see + "${XPCONFIGDIR}/C/print/models/PSspooldir/" and + "${XPCONFIGDIR}/C/print/attributes/printer" and + "${XPCONFIGDIR}/C/print/Xprinters") + and + "PS2PDFspooldir-GS" model config (see + "${XPCONFIGDIR}/C/print/models/PS2PDFspooldir-GS/" and + "${XPCONFIGDIR}/C/print/attributes/printer" and + "${XPCONFIGDIR}/C/print/Xprinters") + are good examples for that. + + + + + Use an existing "model-config" (which would normally send it's data to + a printer using the default print spooler command) and provide a + custom "xp-spooler-command". +
+ + Example (using "SPSPARC2" as printer model, <filename>/w/xp_conv</filename> + as the script to execute and "myscriptprinter" as name of the printer): + + + + Edit ${XPCONFIGDIR}/C/print/attributes/printer and add these lines + (Xprt will replace "%printer-name%" with the printer's name, + "%copy-count%" with the number of job copies, "%job-name%" with the + job's title and "%options%" with any custom spooler options): + +myscriptprinter.xp-model-identifier: SPSPARC2 +myscriptprinter.xp-spooler-command: /w/xp_conv -p %printer-name% -c %copy-count% -t %job-name% -o "%options%" + + + + + + Edit ${XPCONFIGDIR}/C/print/Xprinters and append this line: + +Printer myscriptprinter + + + +
+ +
+
+
+
+
+
+ + + + + How can I disable "xp_ps_spooldir_tmp_Xprintjobs" / "xp_pdf_spooldir_tmp_Xprintjobs" printer targets ? + + + + + Edit ${XPCONFIGDIR}/C/print/Xprinters and + remove or comment-out (using '#') the lines "Printer xp_ps_spooldir_tmp_Xprintjobs" + and "Printer xp_pdf_spooldir_tmp_Xprintjobs". + + + Note: + + Note that Xprt will NOT start if this printer has been removed/disabled + and no other print queue is available (e.g. if "xp_ps_spooldir_tmp_Xprintjobs" + and "Printer xp_pdf_spooldir_tmp_Xprintjobs" are the only printer target available). + + + + + + +
+ + + +Troubleshooting + + + + + Xprt refuses to start with the message "sh: lpc: command not found" on + my Linux machine. What does that mean ? + + + + + Some versions of Xprt look up printer queues using "lpc" on Linux. + In this case "lpc" cannot be found for some reason. + Solution: + Find the place where "lpc" is installed on your machine (some + distributions put it into /usr/sbin, some into /usr/bin/) and check + whether your PATH env var includes this directory. + Example (if "lpc" is located in /usr/sbin/): + + % which lpc + /usr/sbin/lpc + % export PATH=$PATH:/usr/sbin + # Start Xprt ... + % Xprt <your-options-come-here> + + + + + + + + + When the application (=client side) tries to connect to the Xprt + (Xserver) side it fails with a + +Xlib: connection to "meridian:52.0" refused by server +Xlib: Client is not authorized to connect to Server + + What does that mean ? + + + + + X11 implements access control. You can have host-based, cookie-based (a + "cookie" is used like a passport) or user-based (SecureRPC or Kerberos5) + authentification. Xsecurity__miscmansuffix__ + has most of the details. + + + + + No access control: + + + If you do not want to use access control for Xprt then you can start it + with the option "-ac" (see Xserver__mansuffix__) + to disable the access control. + Example: + + % Xprt -ac -audit 4 :12 + + will start Xprt with access control disabled and with auditing enabled + (e.g. the "-audit 4" option). + + + WARNING + + + Disabling the access control will enable everyone who can + access Xprt to print on your printers (that's why the above example + shows how to use auditing, too - that you can see who does something + with Xprt...) !! + + + + + + + + + Host-based access control: + + + Host-based access control can be archived using /etc/X<dpy>.hosts + (<dpy> == display number, e.g. /etc/X0.hosts for display 0 (see + Xserver__mansuffix__ + manual page for further details)). +
+ Example + + + Add the following line to `/etc/X12.hosts' (assuming you want that + the hosts 'merkur' and 'mars' should be able to access the Xprt + server running as display 12 on your host 'neptun'): + +INET:merkur +INET:mars + + + + + + Start Xprt + + + + + Verify that Xprt is correctly configured: + +% export DISPLAY=neptun:12 +% xhost +access control enabled, only authorized clients can connect +INET:localhost +LOCAL: +INET:merkur +INET:mars + + + +
+
+
+
+
+
+
+
+ + + + + Xprt refuses to start with the message "failed to set default font path + '...' Fatal server error: could not open default font 'fixed'". + What does that mean ? + + + + + This means one or more components in the font path (set via the option + "-fp") are either... + + + + ... not valid + + + + + ... contain fonts not supported by this Xserver (e.g. support has not + be compiled "in" (usually happens for TrueType (which are only support for Solaris version + of Xprt and xprint.mozdev.org releases ≥ 008), OpenType (which are only supported by + xprint.mozdev.org releases 009 or higher) or F3 fonts (Sunsoft/F3 fonts are Solaris-specific + and not supported by other vendors (AFAIK)) + when support for these fonts was not enabled at build time)) + + + + + ... no font or font alias in the font path matches the name "fixed" + + + + + ... an entry in fonts.dir or fonts.alias + with the name "fixed" which references a non-existing or non-readable file + + + + + + + + + + + + + Just copying my fonts into a directory and adding the path to my Xprt + command line didn't work - I always get "Fatal server error: could not + open default font 'fixed'". What am I doing wrong ? + + + + + Every Xserver needs an index file called fonts.dir to tell it which + fonts are available in this directory and which properties these fonts + have. + + + If you are lucky there may be already a fonts.scale file which can be + used by "mkfontdir" to create the fonts.dir file. + If there is no fonts.scale then you have to create your own + fonts.dir/fonts.scale either by hand or + via tools like "mkfontscale" (works for all types of scaleable fonts), + "type1inst" (for PS Type1 fonts; see + http://packages.debian.org/stable/utils/type1inst.html) + or "ttmkfdir" (for TrueType fonts; see + http://packages.debian.org/stable/x11/ttmkfdir.html). + + + + + + + + Xprt refuses to start with the message "Fatal server error: Cannot + establish any listening sockets - Make sure an X server isn't already + running". What does that mean ? + + + + + There is already a Xserver running at the display ID you have specified + to start Xprt (for example your framebuffer Xserver runs at ":0" then + Xprt can't run at the same display display). + + + + + + + + Xprt refuses to start with the message "Fatal server error: Failed to + establish all listening sockets". What does that mean ? + + + + + This means that the Xserver could not open one of it's sockets. Check + the permission of /tmp/.X11-pipe and /tmp/.X11-unix (on Solaris a + Xserver must run set-gid "root" to access these directories). + Either fix the permission or start Xprt with the option "-pn". Using this + option requires to access the server always with + <hostname>:<displaynum> (see Xserver__mansuffix__ + manual page for the side-effects of this option). + + + + + + + + Xprt refuses to start with the message "Fatal server error: could not + open default font 'fixed'" or "Fatal server error: could not open default + cursor font 'cursor'". + + + + + All Xservers at least two fonts as the minimum: One fixed-width font + ("fixed") and one font for the cursor ("cursor"). Be sure that the font + path contains these fonts. + + + + + + + + + Xprt refuses to start with the message "Fatal server error: no screens + found". What does that mean ? + + + + + Cause: + + This means that Xprt could not find any printers. Either there are no + printers installed, "lpstat"/"lpc" could not find any printers or the + configuration does not contain any manual printer configurations + (see Q/A item "Which program is used by default by Xprt to enumerate the + printers on my system" for further details...). + + + + + Solution: + + Two solutions: + + + + + Using "PSspooldir" model: + + + Xprt releases from http://xprint.mozdev.org/ provide the "PSspooldir" + model config for such cases. Just edit the "Xprinters" file and add + this line: + +Printer xp_ps_spooldir_tmp_Xprintjobs + + this will add the pre-configured (see + ${XPCONFIGDIR}/C/print/attributes/printer) "xp_ps_spooldir_tmp_Xprintjobs" + printer which will send jobs to the directory "/tmp/Xprintjobs/" + instead to a printer queue. + (This feature was added in the xprint.mozdev.org release 007, see + xprint.mozdev.org bug 2475 ("RFE: Need + model-config which spools print jobs in a predefined directory").) + + + + + + + Manual setup (task list): + + +
+ + + + Provide a simple "Xprinters" spec file which contains a dummy + queue. + Example: + +# Create "Xprinters_onlydummy" file which turns autolookup of printers +# OFF (using "Augment_Printer_List %none%") and provides one dummy +# queue called "ps_myscript" instead (using "Printer ps_myscript") +% echo "Augment_Printer_List %none%" >Xprinters_onlydummy +% echo "Printer ps_myscript" >>Xprinters_onlydummy + + + + + + Edit ${XPCONFIGDIR}/C/print/attributes/printer and add these + two lines: + +ps_myscript.xp-model-identifier: PSdefault +ps_myscript.xp-spooler-command: /home/sanja/xprint_test/my_xprt_cat_script.sh + + This means that the printer "ps_myscript" now uses the "PSdefault" + printer model and it will feed the jobs to the script + "/home/sanja/xprint_test/my_xprt_cat_script.sh" (via stdin). + Note that the absolute path is required for "*xp-spooler-command". + + + + + Start Xprt on display 18, passing the "Xprinters_onlydummy" + using the "-XpFile" option: + +% Xprt -XpFile ./Xprinters_onlydummy -pn -ac -audit 4 :18 + + + + +
+
+
+
+
+
+
+
+
+ + + + + "Printing itself works but the printout covers only 1/4 of the paper - what am I doing wrong ?" + + + + + This is usually an indicator for a wrong DPI setting. The default + "PSdefault" model config uses 300 DPI but some printers only support + 600 DPI. + + + Workaround: + + Edit ${XPCONFIGDIR}/C/print/attributes/document and replace the line + "*default-printer-resolution: 300" with + "*default-printer-resolution: 600" + (Note that locale-specific settings in + ${XPCONFIGDIR}/${LANG}/print/attributes/document always override values + set in ${XPCONFIGDIR}/C/print/attributes/document.) + + + + Solution: + + Create a model-config for your printer which only contains attributes + supported by your printer ("printer-resolutions-supported" is the + attribute in the "model-config" which holds the space-seperated list + of DPI values which are supported by the printer). + + + + + + + + + "Printing works but I get large borders/margins..." / "[Top] margin is too small" / + "Margins are wrong" / etc. + + + + + Two possible causes: + + + + Usually same issue as "Printing itself works but the printout covers + only 1/4 of the page"-issue: Wrong DPI. + Solution: Check the DPI value and adjust it as described in the FAQ item + above. Common DPI values for the PostScript DDX are 240, 300, 360, 400 + and 600 DPI. + + + + + You are trying to print "US-letter" on a "DIN-A4" paper or "DIN-A4" on + "US-letter". + + + Solution: Check your paper settings + + + Note that the default papersize for Xprt depends on the locale + (e.g. on the env var ${LANG}) Xprt is running in - "en_US"&co. get + US-letter, all others use DIN-A4 (incl. german/austrian etc. locales)). + Exception from this rule: If the selected printer does not support the + default paper size it will set no default paper size for this printer + (then the application side has to make an explicit choice). + + + + + + + + + + + Xprt prints a warning like "Xp Extension: could not find config dir + /usr/X11R6/lib/X11/C/print" - what does that mean ? + + + + + This is actually the worst case what can happen. + The message indicates that Xprt was unable to find it's configuration + data. + + + Solution: + + Two solutions are possible: + + + + Install the configuration data at the requested location + (/usr/X11R6/lib/X11/C/print/ in this example) + + + + + Set the ${XPCONFIGDIR} env var to the location of the Xprt + configuration directory. + + + + + + + + + + + + Xprt crashes with "Fatal server error: Beziers this big not yet supported" + What does that mean ? + + + + + This is a known issue in the X11R6.5.1 code. In rare cases some PostScript + Type1 fonts can trigger this. + See "My PS Type1 font does not work with my Xserver" ... + + + + + + + + "My PS Type1 font does not work with my Xserver - how can I fix this ?" + + + + + Some PS Type1 do not work out-of-the-box with all PS Type1 font engines - + some will work with the Adobe font engine (used in Solaris Xsun) but not + with the X.org font engine (or the other way round) or the fonts are + simply broken. + + The following procedure will try to fix this problem: + Get the "type1fix" perl script the TeXTrace package + (http://www.inf.bme.hu/~pts/textrace-latest.tar.gz) + and run it over the fonts. + + Example 1 (filter fonts): + +# Broken PFA fonts are in broken_fonts/ +% mkdir fixed_fonts ; cd fixed_fonts +% for i in ../broken_fonts/*.pfa ; do + echo " ------- $i" ; + type1fix.pl --ofmt=pfa --infile=$i --outfile=$(basename ${i}) ; + done + + + Example 2 (filter fonts and convert them to PFB on-the-fly; do not forget + to update fonts.scale and run "mkfontdir" (to update fonts.dir) ; + systems which use the Adobe font engine (like Solaris/Xsun) may require + to run "makepsres", too): + +# Broken PFA fonts are in broken_fonts/ +% mkdir fixed_fonts ; cd fixed_fonts +% for i in ../broken_fonts/*.pfa ; do + echo " ------- $i" ; + type1fix.pl --ofmt=pfb --infile=$i --outfile=$(basename ${i%.pfa}.pfb) ; + done + + + + + + + + + I can't get it working. I have set ${DISPLAY} correctly to point to the + Xprt display and... ... What is going wrong ? + + + + + Do not set ${DISPLAY} to the Xprt server. You still need your normal + Xserver for your video card - Xprt is only for your printer(s). + Applications look up Xprt servers via the ${XPSERVERLIST} env var, NOT + via the ${DISPLAY} env var. + + + + + + + + When I try to print via Xprint I get the message "Fatal server error: + unable to exec '/usr/bin/lp'". What is going wrong here ? + + + + + This usually means that the spooler application "/usr/bin/lp" + could not be launched. This is usually the result when + /usr/bin/lp does not exist or + cannot be executed (for example, shell scripts without the +x (executable) flag etc.). + + + + + + + + The Solaris Xprt prints some error messages about PostScript fonts like + "FOOBAR not found, using Courier. CMEX0123 not found, using Courier." + etc. and uses "Courier" instead of these fonts... + + + + + Cause: + + The Solaris (Adobe-based) PostScript font engine requires a "PostScript + resource database" file named "PSres.upr" to use the PostScript fonts + correctly. + + + + Solution: + + Create the missing PSres.upr database. +
+ + Steps to create the missing "<filename>PSres.upr</filename>" file (task list): + + + Go to the location where the matching fonts are installed (we're using + /home/sanja/mathml_fonts/tex_cmps/Type1/ in this example): + +% cd /home/sanja/mathml_fonts/tex_cmps/Type1// + + + + + + Create "PSres.upr" using the "makepsres" command. + +% makepsres + + + + + + Validation: + Make sure the file has been created: + +% ls -l PSres.upr + + + + + + Restart Xprt server(s): + +% /etc/init.d/xprint restart + + + + + + Restart application which uses these fonts + + + +
+
+
+ + References: + + + makepsres1 manual page + bugzilla.mozilla.org 120560 ("Solaris Xsun does not like CMEX10/CMSY10 Type1 fonts") + bugzilla.mozilla.org 142718 ("Document how to get the MathML fonts to work on Solaris") + + + +
+
+ + + + + "Xprt refused to start, complaining about a missing dir + (/etc/X11/xserver/C/print/ directory)... I created it by hand (empty) and + started Xprt but it still does not work properly..." + + + + + Xprt expects some config data in this directory. Just making it an + existing but empty dir will work around the error message but will not + result in a properly working Xprt since it has no (usefull) builtins + which would make it possible to run the binary without the config data. + Your X11 binary distribution should always come with the config data + (for example /usr/openwin/server/etc/XpConfig/ on Solaris) or you will not + be able to use Xprint (however it is possible to copy the config data + from another system :) + BTW: Source for the configs can be found under xc/programs/Xserver/XpConfig/ + + + + + + + + My Linux system already shipps with a '/usr/X11R6/bin/Xprt'-binary. + Do I need the binary distribution from http://xprint.mozdev.org/ ? + + + + + This depends on what is shipped with your Linux distribution. + Please check the "vendor" string of the Xprt server: + +% Xprt :10 & +% xdpyinfo -display :10 | grep -i "vendor string" + + If this outputs a line like "vendor string: The XFree86 Project, Inc" + then you have the Xprt binary build from Xfree86 sources - which are + broken - even the newest version [I'll update this as soon as Xfree86 + shipps with a working version]. + Xprt from Solaris, HP-UX and my own builds (which identifies itself as + "vendor string: xprint.mozdev.org" for releases >= 007, older releases + (e.g. <= 006) identify itself as as "vendor string: The X.Org Group") + are known to work proprtly. + + + + + + + + I am getting the error message "error opening security policy file + /usr/X11R6/lib/X11/xserver/SecurityPolicy". What does that mean ? + + + + + The policy file for the SECURITY extension cannot be found. + This is not serious unless you want to make use of features of the + SECURITY extensions (like treating clients as "untrusted", e.g. restrict + their access to certain Xserver resources). + Normally the missing policy file is a problem with your Unix/Linux X11 + distribution; consult your vendor where to get the missing file from. + Alternatively you can get the plain X11R6.6 security policy file from + ftp://ftp.x.org/pub/R6.6/xc/programs/Xserver/Xext/SecurityPolicy + (copy it to the matching location - but be sure that you do not overwrite any + existing security policy file). + + + + + + + + I have modified the "HPLJ4family" [or "HPDJ1600C" etc.] printer model to + work with my PostScript printer, but when I print I get empty places + where some text should be - what am I doing wrong here ? + + + + + The "HPLJ4family" and "HPDJ1600C" models are PCL-only, check + the model-config spec + (${XPCONFIGDIR}/C/print/models/${MODEL_NAME}/model-config) - if the + "xp-ddx-identifier" attribute says something with "PCL" (like + "XP-PCL-MONO" etc.) in the value string then this model-config is for + the PCL-DDX only (e.g. their PMF fonts do not supply the neccesary + information (e.g. the "_ADOBE_POSTSCRIPT_FONTNAME" chunk is missing; + they only provide the "PCL_FONT_NAME" chunk) nor are these fonts + accessible via the PostScript-support in these printers. + A solution is to use the "PSdefault" model instead (and/or create your + customized own version of this model) - or look if there is a + model-config beginning with the same name and ending with "PS" (e.g. + "HPLJ4family-PS"). + + + + + + + + Xprt outputs warning messages like: + + +Xp Extension: Can't load driver XP-PCL-MONO + init function missing +Xp Extension: Can't load driver XP-RASTER + init function missing + + + What does that mean ? + + + + + Two possible problems: + + + + The requested driver is not supported by that version of Xprt. + For example Solaris 2.7 Xprt does not support XP-PCL-MONO nor the + XP-RASTER driver. + Valid values for the "xp-ddx-identifier" attribute in + ${XPCONFIGDIR}/*/print/attributes/printers and/or + ${XPCONFIGDIR}/*/print/models/*/model-config are + + + + Solaris 2.7: XP-POSTSCRIPT and XP-PCL-COLOR + + + + + Solaris >=2.8: XP-POSTSCRIPT, XP-PCL-COLOR, XP-PCL-MONO and XP-RASTER + + + + + HP-UX: XP-POSTSCRIPT, XP-PCL-COLOR, XP-PCL-MONO, XP-PCL-LJ3, + XP-PCL-DJ1200 and XP-RASTER + + + + + xprint.mozdev.org release 007: XP-POSTSCRIPT and XP-RASTER + + + + + xprint.mozdev.org release 008: XP-POSTSCRIPT, XP-PCL-COLOR, + XP-PCL-MONO, XP-PCL-LJ3 and XP-RASTER + + + + + xprint.mozdev.org release >=2.0 (planned): XP-POSTSCRIPT, XP-PCL-COLOR, + XP-PCL-MONO, XP-PCL-LJ3, XP-RASTER, XP-PDF and XP-SVGPRINT. + + + + + + + + There may be too many drivers loaded into one Xprt instance. + By default a single Xserver instance can only handle three screens - and + since one Xprint DDX maps to one Xserver screen this limit applies to + the number of loaded Xprt drivers, too. + Starting with xprint.mozdev.org release 008 the per-Xserver screen limit + was increased from "3" to "8" to avoid this issue... + Workaround: Start a 2nd instance of Xprt which handles the other + drivers which do not fit into the first instance. + + + + + + + + + + + Printing on Solaris with Mozilla/Eclipse [or any other Xprint client] + removes spaces between words. What is going wrong ? + + + + + Cause: + + This is a bug in the Solaris Xprint server binary (/usr/openwin/bin/Xprt). + Various bug reports have been filed, see + + + + xprint.mozdev.org bug 3353 + ("Solaris Xprt looses space when rendering with '-monotype-arial-*'-fonts") + + + + + bugzilla.mozilla.org bug 199957 ("Solaris 8 Mozilla + removes spaces for text within <font face="Arial">...</font>") + + + + + + + + Solution: + + Solution: + Please apply the following OS patches from http://sunsolve.sun.com/: + + + Solaris patches to fix <ulink url="http://xprint.mozdev.org/bugs/show_bug.cgi?id=3353">xprint.mozdev.org bug 3353 + ("Solaris Xprt looses space when rendering with '-monotype-arial-*'-fonts")</ulink> + + + + + + + + + + + + + + Solaris 2.7 + Solaris 2.8 + Solaris 2.9 + + + SPARC + x86 + SPARC + x86 + SPARC + x86 + + + + + n/a + n/a + + 108652-73 + 108653-62 + + 112785-21 + 112786-11 + + + +
+ + + + For Solaris 2.7 (both SPARC and x86 platforms) there are currently + no patches available... + ;-( + + +
+
+ + + Known workarounds: + + + + + Remove the '-monotype-arial-*' fonts from the font path + + + + + Use an alternate Xprint server like available in the "GISWxprint" package + (this package is identical to the "GISWxprintglue" package except that it + uses a Xprint server build from xprint.mozdev.org sources and not the + /usr/openwin/bin/Xprt binary from Solaris) + + + + + Mozilla-only: Adding + + user_pref("print.xprint.font.rejectfontpattern", + "fname=-dt-.*;scalable=.*;outline_scaled=false;xdisplay=.*;xdpy=.*;ydpy=.*;xdevice=.*|" + + "fname=-monotype-arial.*;scalable=.*;outline_scaled=.*;xdisplay=.*;xdpy=.*;ydpy=.*;xdevice=.*"); + + to prefs.js works around the problem (see + bugzilla.mozilla.org bug 199957 comment #6, + too). + + + Note that this workaround may render various locales completly + inaccessible for printing since many of them only employ MonoType fonts. + + + + + + + + +
+
+ + + + + Installation of the "GISWxprint" / "GISWxprintglue" packages fails like this: +# pkgadd -d /space/staging/xprint/GISWxprint.pkg +pkgadd: ERROR: no packages were found in </var/tmp/dstreAAA5Jayyz> + Any idea what I am doing wrong ? + + + + + The target machine misses a patch to cure SunSolve bug 4025718 ("pkginfo: allow greater than nine characters for PKG parameter value"). + Please apply the patches listed in the "Installation Requirements" section in the README + for the GISWxprint / + GISWxprintglue package. + + + + + + + + + Printing page results in [two/three/.../16] leading blank pages, followed by a correct (but offset) page. + Any idea what is going wrong ? + + + + + This symptom depends on the CUPS GhostScript driver used, however the exact cause is currently unknown + (see comments in SuSE + support database entry SDB-2002/11/jsmeix_print-81-cups-formfeed ("Blank Pages When Printing with + CUPS")). + + + Solution: + + Disable the CUPS accounting functionality in the cupsomatic filter by changing the line + + my $ps_accounting = 1; + + to + + my $ps_accounting = 0; + + in the filter script /usr/lib/cups/filter/cupsomatic as the user root. + If you use /etc/foomatic/filter.conf, disable ps_accounting there. + + + + References: + + + SuSE support database entry SDB-2002/11/jsmeix_print-81-cups-formfeed ("Blank Pages When Printing with CUPS") + xprint.mozdev.org bug 4181 ("Two empty pages printed first") + bugzilla.mozilla.org bug 180602 comment #7 ("Printing page results in 16 leading blank pages, followed by a correct, but offset, page") + + + + + + +
+ + + +Software development + + + + + How does the X print server (Xprt) and the Xlib client side differ + from the "normal" video Xserver/video client side ? + + + + + The X Print Service expands on the traditional X-Server and Xlib world + in the following ways: + + + + + Most obvious is the use of "print ddx drivers" instead of + "video ddx drivers". While a video ddx driver modifies pixels + in a video frame buffer, a print ddx driver generates "page + description language (PDL)" output (such as PCL, PDF, PostScript, SVGprint, etc.) + or sends the print rendering instructions to a platform-specific + print API (like Win32/GDI). + + + Once a print ddx driver generates PDL output, it can be sent to + a spooler + (using XpuStartJobToSpooler) + or retrieved by the client (to implement functionality like "print-to-file" + with functions such as XpuStartJobToFile). + + + + + Since printers support "paged" output, unlike video, a portion + of the Xp Extension supports APIs to delineate printed output + into a print job. + + + A "print job" in Xprint consists of one or more "documents" which itself + consists of one or more "pages". + + + + A client starts a job sequence with XpStartJob and + ends it with XpEndJob or XpCancelJob to cancel the + generation of the current print job. + Any document-specific print attributes MUST be changed before XpStartJob. + + + + A client starts a document sequence with XpStartDoc and + ends it with XpEndDoc or XpCancelDoc to cancel the + generation of the current document. + Any document-specific print attributes MUST be changed before XpStartDoc + or after XpEndDoc (to affect the following document). + + + + A client starts a page sequence with XpStartPage and + ends it with XpEndPage or XpCancelPage to cancel the + generation of the current page. + Any page-specific print attributes MUST be changed before XpStartDoc + or after XpEndDoc (to affect the following document). + + + + + Since printers have extensive capabilities, another portion of + the Xp Extension supports APIs to manipulate "print contexts". + + + Once a printer is selected using the Xp Extension API, a print + context to represent it can be created. A print context + embodies the printer selected - it contains the printer's + default capabilities, selectable range of capabilities, + printer state, and generated output. Some "attributes" within + the print context can be modified by the user, and the + X-Server and print ddx driver will react accordingly. For + example, the attribute "content-orientation" can be set to + "landscape" or "portrait" (if the printer supports these + values - which can be queried using the Xprint API as well). + + + + + Since printers can have "built in" fonts, the Xp Extension in + the X-Server works with the print ddx drivers to make + available (for printing only) additional fonts on a per print + context basis. + + + When a print context is created and set for a given printer, + the X font calls may be able to access additional printer + fonts. To do this (typically), the X-Server must have access + to "printer metric files" (.pmf) that describe at minimum the + metrics of the built in fonts. + + + + + Since printers can have "built in" fonts, the Xp Extension in + the X-Server works with the print ddx drivers to make + available (for printing only) additional fonts on a per print + context basis. + + + When a print context is created and set for a given printer, + the X rendering calls use the resolution of the current page + (or if not given, the resolution of the current document or + the current resolution for this print job). + The screen's resolution is INVALID in this case. + XprintUtils has the functions XpuGetResolution + (to get the current print resolution (searching page, document and + job level attributes (in that order)), XpuSetPageResolution + (to set the current page resolution), XpuSetDocResolution + (to set the current document resolution), XpuGetResolutionList (to + get the list of all resolutions supported by this printer) and XpuFindResolution + (to find a resolution in the list returned by XpuGetResolutionList) + to support getting/setting/queries of resolutions. + + + When a print context is created and set for a given printer, + the X image rendering calls (such as XPutImage support + scaling of images. + The Xp Extension API provides the functions XpSetImageResolution + and XpSetImageResolution to set and get an image resolution. + The scaling factor for an image printed on the paper can simply calculated via + + scaling_factor = curr_print_resolution_resolution / image_resolution + where curr_print_resolution_resolution is the value returned by a function such as + XpuGetResolution, image_resolution the resolution passed to + XpSetImageResolution and scaling_factor the resulting scaling factor. + Note that XpSetImageResolution will failure (=FALSE) when the print DDX + (for example the RASTER DDX) does not support scaling. + In that case the application has to scale the image manually. + + + + + + + + + + + How can I get the printable area (e.g. the portion of the page on which + the printer is physically capable of placing ink) of the paper after I + have chosen a paper ? + + + + + The XpGetPageDimensions function returns the printable area and other information + about the current page geometry. + Note that the page geometry changes when the page attributes such as content-orientation + or default-medium are changed by the application. + + + + + + + + Do "offscreen" pixmaps work on Xprt ? + + + + + Yes, "offscreen" pixmaps are working on Xprt. + + + + + + + + How can I get the DPI value for the current Xprt server ? Can I use the + values from "xdpyinfo" ? + + + + + The Xprt screen resolution defines only the maximum resolution configured + for the matching DDX, the printers real DPI is obtained via an another + API (XprintUtil has a bunch of functions to get/set the document/page + resolution, see XpuGetResolutionList, XpuFreeResolutionList, + XpuGetResolution, XpuSetPageResolution, + XpuSetDocResolution and XpuFindResolution). + + + + + + + + Why does Xprt not offer the MIT-SHM protocol extension ? + + + + + The MIT-SHM protocol extension is partially (XShmPutImage would work, + but others like XShmGetImage and esp. XShmCreatePixmap + cannot be implemented properly) incompatible to the way how some of the Xprint DDX are implemented. + For example the PostScript, PDF, PCL and SVGprint DDX do not rasterize any images on their side - instead they convert the + stream of X11 rendering instructions into the matching PDL instruction stream. + Only the printer side will (finally) do the rasterisation of the output image. This is the basically the same reason why + XGetImage does not work for those DDXs - and + functions such as XShmCreatePixmap would be useless since drawing operations on the shared + pixmap would not be applied to the application (e.g. Xprint client) as well. + + + + + + + + Does Xprint/Xprt support font rotation ? + + + + + Yes - Xprint/Xprt supports font rotation at any angle via the matrix XLFD + enhancement (this even works for printer-builtin fonts !!). For details + see the paper "New Font Technology for X11R6" by Nathan Meyers (a copy can be found in the + Xprint.org source tree under xc/doc/hardcopy/XLFD/x11r6_fonts_94_paper.PS.gz) + + + Short: + The transformation-matrix for rotation can be calculated like this: + ++-- --+ +| cos(angle) sin(angle)| +| | +|-sin(angle) cos(angle)| ++-- --+ + + Examples: + + + + the following code fragment obtains a 180 degree rotated font (matrix [-1 0 0 -1]): + + ... = XLoadQueryFont(..., "-adobe-courier-bold-r-normal--*-[~24 0 0 ~24]-0-0-m-*-iso8859-1"); + + + + + + the following code fragment obtains a 90 degree rotated font (matrix [0 1 -1 0]): + + ... = XLoadQueryFont(..., "-adobe-courier-bold-r-normal--*-[0 24 ~24 0]-0-0-m-*-iso8859-1"); + + + + + + + Future versions of Xprint will support the STSF + font API which supports matrix transformations as well. + + + + + + + + When I render something on my window and call XpStartPage all the + rendered stuff is gone, I only get a white, empty paper. + What is going wrong here ? + + + + + Remember the rule that "only those drawings are printed on the paper which + were rendered between XpStartPage and XpEndPage". + XpStartPage clears the window you passed as argument, e.g. it creates + a new, blank sheet of paper where you can do your rendering stuff on. + XpEndpage then pushes the "paper sheet" to the stash of papers from the + document in process. + + + + If you want to render something once for multiple or all pages: + Render on a offscreen pixmap and copy (with XCopyArea) the content to + the "paper" drawable (after calling XpStartPage) - XpStartpage only + affects the window passed as parameter. + + + + + + + + + + What is XpStartDoc for ? + + + + + ISO 10175 and some advanced printing systems by IBM and HP had set forth + the standard that a "Job" is made up of one or more "Documents", and + each document is made up of one or more "Pages". Xprint was designed that + in a true ISO 10175 environment/implementation (lp1 on steroids, and + with an API), Xprt can actually learn about all printers and their + capabilities though API's into the printer subsystem (vs. using config + files), map Job/Doc/Page directly into ISO 10175 equivalents, and use + APIs to view job status and kill jobs (vs. + cancel1, + lpcancel1, + lpstatus1). + Because most applications of the day are only printing one document per + job, XpStartPage was designed that it generates a "synthetic" + XpStartDoc if it has not been called yet. + + + + + + + + How does the XLFD for printer-builtin fonts look like ? / How can I find/identify printer-builtin fonts ? + + + + + There is no special XLFD scheme for printer-builtin fonts. + Instead the xp-listfonts-modes-supported is used to define + whether XListFonts and co. return printer-builtin fonts or not. + By default the attribute looks is set to + *xp-listfonts-modes-supported: xp-list-internal-printer-fonts xp-list-glyph-fonts which defines + thaht XListFonts and co. return both printer-builtin and normal fonts. + Removing xp-list-internal-printer-fonts will make printer-builtin fonts disappear, + removing xp-list-glyph-fonts will make normal glyph fonts disappear from font lists. + + + + + + + + How can I scale images using the Xprint API ? + + + + + XXX + + + + + + + + Can I pass my own PostScript code (fragment) to the print spooler instead of letting + Xprt's PostScript DDX generate it ? + + + + + XXX + + + + + + + + When I use XpPutDocumentData I get a + BadValue X protocol error. Any idea what am I doing wrong ? + + + + + XXX + + + + + + + + + How do I use the XprintUtil library ? + + + + + XXX + + + + + + + + Why does the XGetImage not work for Xprt ? + + + + + There are at least three reasons why XGetImage does not work for Xprt: + + + + Most of the Xprt DDX implementations do not render itself on any + bitmaps like the framebuffer(=video) DDX do, they translate the + rendering commands into the matching commands of the printer language + (it is technically possible to implement such support for XGetImage + even for those drivers - but there are more reasons:) + + + + + Xprt usually operates at high resolutions which results in very large + dimensions. If a client would request the 24bit TrueColor bitmap + data for a whole DIN-A4 page at 2400 DPI a data chunk of ~173 + megabytes would be the response. This would be more or less a + DOS(=Denial of Service) for either the client, the network and/or the + server. + + + + + The printer-builtin fonts only provide metrics information - there is no real "outline" + information at that time (these fonts reside only in the printer's ROM and are only + available at the time the printer rasterizes the incoming PDL + (e.g. PCL/PostScript) data stream) which could be used to rasterize the matching glyphs + (which means: A XGetImage implementation would return image + data but glyphs rendered using the printer-builtin fonts would be missing). + + + + + + + + + + + How to print with Xt/Athena widgets ? + + + + + There are two examples in the Xprint.org source tree which demonstrate how to use Xprint using + Athena widgets: + + + + xc/programs/xphelloworld/xpawhelloworld/ contains a simple + demo application which prints a Athena widget using the XawPrintShell widget class. + + + + + xc/programs/xphelloworld/xpxthelloworld/ contains a simple + demo application which prints a Athena widget without using a special print + widget class (however, if possible a print shell such as XawPrintShell or + XmPrintShell should be used since this is the easier way to add print + support to an Athena application). + + + + + + + + + + + How to print with Xt/Motif widgets ? + + + + + The Xprint.org source tree contains the xpxmhelloworld (xc/programs/xphelloworld/xpxmhelloworld/) + application to demonstrate how to print using the Motif2 toolkit. + + + + + + + + What are the differences between normal display and Xprint display ? + + + + + XXX + + + + + + + + How do I scale images ? + + + + + XXX + + + + + + + + libXp Image scaling vs. max. request size ? + + + + + XXX + + + + + + + + How can I use XprintUtils ? + + + + + XXX + + + + + + + + How do I calculate the DPI values for Xprt DDX screens ? + + + + + XXX + + + + + + + + How do I find scaleable fonts ? + + + + + XXX + + + + + + + + How do I find printer-builtin fonts ? + + + + + XXX + + + + + + + + The XLFD for Printer-builtin fonts look like bitmap fonts - is that bad ? + + + + + No, this is not "bad". The XLFD of a printer-builtin font only looks like a bitmap font since + the *.pmf (Printer metrics file) format is a PCF file format variant (the DPI values in the XLFD + AFAIK specifies the resolution which was used for generating the metrics) - however this does not + change the fact that the printer-builtin fonts are outline scaleable fonts these fonts reside in the + printer's ROM). + + + + + + + + When printing using the XawPrintShell/XmPrintShell print shells my PostScript output + is always corrupt. What am I doing wrong ? + + + + + Make sure the widgets (such as text input widgets) have the (blinking) cursor turned-off. + Setting the XmNcursorPositionVisible, to False usually + solves the problem (for Motif2 widgets). + Example: + + +... +XtSetArg(args[n], XmNcursorPositionVisible, False); +... + + + + + + + + + + When printing using the XawPrintShell/XmPrintShell + print shells I always get a grey/dithered background on paper. + Any idea how to change that to "white" ? + + + + + XXX + + + + + + + + Are there any caveats/suggestions when printing via Xt/Motif2 widgets ? + + + + + There are a couple of Xt resources which may likely differ from the normal values (e.g. those values + used for a video Xserver): + + + Core class level + + + + + XmNbackground resource + + + The application will probably want to set the XmNbackground resource + to "white" to match the default paper color. + + + + + XmNborderWidth resource + + + The application will probably want to set the XmNborderWidth resource + to "0" (usually the default value) to avoid that a black border appears around the widget. + + + + + + + + + XmPrimitive class + + + + + XmNshadowThickness and XmNhightlightThickness resources + + + The application will probably want to set XmNshadowThickness and + XmNhightlightThickness to "0" (usually the default value) to avoid + 3D border effects on the printout (depends on application and author's preference... + :-)). + + + + + + + + + XmText and XmTextField classes + + + + + XmNcursorPositionVisible resource + + + The application will probably want to set XmNcursorPositionVisible + to False to avoid that the cursor is visible on printouts (and to avoid + problems with some nasty implementation details which may cause corrupted PostScript output). + + + + + XmNscrollHorizontal and XmNscrollVertical resources + + + The application will probably want to set the XmNscrollHorizontal and + XmNscrollVertical resources to False to suppress printing + of scrollbars (on paper "scrolling" is replaced with "pagination" except for rare exceptions + (like 1:1 WYSIWYG-printing)). + + + + + XmNmarginWidth and XmNmarginHeight resources + + + The application will probably want to recalculate the XmNmarginWidth and + XmNmarginHeight resources based on the (far) higher print resolution + (or reverse: set them to "0" - depending on what style matches + the application needs better...). + + + + + + + + + XmLabel class + + + + + XmNmarginTop, XmNmarginBottom, + XmNmarginRight, XmNmarginLeft, + XmNmarginWidth, XmNmarginHeight and + XmNalignment resources + + + The application will probably want to use different value for XmLabel class's + XmNmarginTop, XmNmarginBottom, XmNmarginRight, + XmNmarginLeft, XmNmarginWidth, XmNmarginHeight and + XmNalignment resources. These resources are mainly usefull when the widget holds a + border, highlight or shadow of some kind. If borders are not to be transferred there is no real need to transfer + a margin either. + + + + + + + + + + + + + + + + + Can I change the paper size/resolution/page orientation/etc. when printing using the + XawPrintShell/XmPrintShell print shells ? + + + + + Yes, it is allowed to change the page attributes in the page setup callback + (e.g. XawNpageSetupCallback or XmNpageSetupCallback) + since this callback is always called before XpStartPage + (for the 2nd and following pages: between XpEndPage and + XpStartPage). + Note that changing page attributes will automagically update the print shell widget size + (e.g. attributes XawNminX, XawNminY, XawNmaxX and XawNmaxX (XawPrintShell) + or + XmNminX, XmNminY, XmNmaxX and XmNmaxX (XmPrintShell) are updated based + on events send by the Xp Extension and then the print shell is resized based on the new values (XawPrintShell is slightly more flexible + since the size mode can be defined using the XawNlayoutMode attribute)). + + + + + +
+
+ + + +Known bugs + + + + + + + Xprt build from Xfree86 sources is completely broken and unuseable. + + + + + + Build Xprt from the CVS tree at http://xprint.mozdev.org/ or the + X.org X11R6.5.1 sources (note that the client side Xprint extension + library ("libXp.so") from Xfree86 is not broken and do not need to be + replaced). + + + + + + + + + The code which matches XLFD names to PS Type1 font names is + case-sensitive in Xprts build from X.org X11R6.5.1/X11R6.6 and the + current Solaris Xprt. This may cause that the PS DDX refuses to + download PS Type1 fonts. + + + + + + Patch available, I am looking for a way to get the patch into the X11 + and Solaris source trees... + + + + + + + + + Xprt build from X11R6.5.1/X11R6.6 sources and Solaris's version of + Xprt can only download PFA (PS ASCII font) fonts which ends of the + ending "*.pfa". + + + + + + Either convert PFB (PS Type 1 binary font) to PFA format and adjust + the fonts.dir and fonts.scale file or get a patch for the sources. + I am looking for a way to get the patch into the X11 and Solaris + source trees (the fixed version can download both PFA/PFB fonts in + PFA format and even handles non-standard file extensions). + + + + + + + + + There is an issue how the Linux and Solaris Xprt handles the + "copy-count" of a print job. The result may be that a job with n + copies of a document end-up in n jobs with n copies (usually equals + to n^2 copies). + + + + + + Xprt build from xprint.mozdev.org sources has been fixed in release + 007, see xprint.mozdev.org bug 1378 + ("PS DDX creates n^2 copies of a job instead of n copies") and + bugzilla.mozilla.org 140030 + ("Setting number of copies causes too many copies to print") for details. + Solaris 2.7 Xprt still suffers from this issue... ;-( + + + + + + + + + + + Unanswered questions + + (My small ToDo list what I will write soon; 379 items missing... =:-) + Email me if you want one of these answered "now" and/or to contribute + an answer... :) + + How do I create a model-config for my printer ? + How can I customize a model-config for my site/machine ? + Which attributes/values can be set in a model-config ? + Why can't I set default values (for my {paper size, resolution, ...}) in the model-config ? + Should I add the fonts in the model-config dir to the Xserver's font path ? + What are the fonts in the model-config dir for ? + Can I use a font server for all fonts instead of passing then directly to the Xprint server ? + Does the Xprint PostScript driver do full rasterisation of the print job ? + Is it possible to prepare a printer config entry so that the PS + output is piped to "ps2pdf" and will produce directly a PDF file? + It would be nice to have mozilla directly producing PDF files when + printing. + + Problem: I have changed the Xprt config - but "xplsprinters -l" + (or any other Xprint application) does not show the change. + Any idea what I am doing wrong ? + How can I add a font path to Xprt ? + Why does "xset +fp path_to_font" not work in some cases ? + How can I get a "core"-dump when Xprt crashes ? + How can I debug Xprt (hint: use "-audit 4") ? + How can I debug Xprt with Sun Workshop (hint: "check -access") ? + How can I check whether Xprint is "active" ? / How can I verify that a Xprint is working ? + + + + + + Acknowledgements + + We'd like like to express their gratitude to the whole community for + providing insightful answers to innumerable questions. In particular, + the following people (listed alphabetically) have contributed to this + FAQ (apologies, in advance, if anyone has been forgotten): + + + + Alan Coopersmith alan.coopersmith@sun.com + Giuseppe Ghibò ghibo@mandrakesoft.com + Thomas Gilg thomas_gilg@hp.com + Jay Hobson jay.hobson@sun.com + Masaki Katakai katakai@japan.sun.com + Simon Montagu smontagu@smontagu.org + Drew Parsons dparsons@debian.org + (and many many others) + + + + + +
+ + + Index: xc/doc/hardcopy/XPRINT/Xprint_old_FAQ.txt =================================================================== RCS file: xc/doc/hardcopy/XPRINT/Xprint_old_FAQ.txt diff -N xc/doc/hardcopy/XPRINT/Xprint_old_FAQ.txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/doc/hardcopy/XPRINT/Xprint_old_FAQ.txt 21 Apr 2004 09:33:56 -0000 @@ -0,0 +1,1634 @@ +Archive-name: Xprint/FAQ_OLD +Version: 0.8 +Last-Modified: 2003/08/04 15:20:19 +Maintained-by: Roland Mainz + +NOTE: This version of the FAQ has been discontinued and was replaced by the +DocBook-based version available under xc/doc/hardcopy/XPRINT/Xprint_FAQ.xml +(available through http from +) + +The following is a list of questions that are frequently asked about +Xprint. + +You can help make it an even better-quality FAQ by writing a short +contribution or update and sending it BY EMAIL ONLY to me. +A contribution should consist of a question and an answer, and increasing +number of people sends me contributions of the form "I don't know the +answer to this, but it must be a FAQ, please answer it for me". Please +read the FAQ first and then feel free to ask me if it is not in the FAQ. + +Thanks! + +The latest Xprint FAQ and some other goodies can be obtained through http from + + +Note that the FAQ has not been finished yet (nor is it half-finished...), +many items marked with "XXX" as the answer have still to be written (or have +to be copy&pasted from my item collection... :) + +1. GENERAL +- 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 or PDF. + + 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. + 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[1] 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) + - The client-side Xprint support library (libXp.so) is available on all + X11 platforms >=R6.4, including Linux, Solaris, HP-UX, AIX etc. + if you do not have it you can build it from the sources available at + http://xprint.mozdev.org/ + + [1]=(for Solaris >= 2.7 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)) + +- 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: "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" + Fact: Whoever says Xprint simply does an "xwd"-like dump is wrong. + + In short, Xprint _currently_ (X11R6.5.1) supports *four* drivers: + 1) X to native Postscript + 2) X to native PCL5 + 3) X to native PCL3 + 4) 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 PostScrpt and PCL5 printing and more + drivers (like a PDF DDX 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 PostScipt Type1 fonts. However this + is the fallback - the _last_ option used by Xprt. Used if + everything else fails. + But when someone does not pass any 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. Fonts can be rotated at any + angle. Take a look at the "SOFTWARE DEVELOPMENT" section in this + FAQ for examples... + +- 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: - On Unix/Linux (general): + - GhostScript ("gs") and GhostView ("gv") + - Solaris: + - /usr/dt/bin/sdtimage (DPS-based image viewer for CDE) + - /usr/openwin/bin/pageview (DPS-based image viewer for OpenWindows) + +- Q: How can I view PCL files ? + A: XXX - http://xprint.mozdev.org/bugs/show_bug.cgi?id=2261 has been filed + for that issue. + +- Q: How does Xprt find fonts ? + A: Lookup-rule for Xprt's PostScript DDX to find fonts: + 1. Printer-builtin fonts (defined by the fonts/-dir in the model-config) + 2. PostScript fonts (will be downloaded via generated print job) + 3. GFX-fonts build from X11 scaleable fonts + 4. GFX-fonts build from X11 bitmap fonts + +- Q: How can I print TrueType fonts with Xprint ? + A: 1. 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. + 2. Sun's Xprt on Solaris (/usr/openwin/bin/Xprt) has TrueType font + support out-of-the-box and does not require any special actions + 3. You can setup a TTF-aware X font server ("xfs", see xfs(1)) with the + matching TrueType fonts and add the font server location to Xprt's font + path. + 4. 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: 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-HX + (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 (full framework incl. special widgets like XmPrintShell) + - Common Desktop Environment (CDE) 2.x + - Mozilla + - Eclipse + - KDE/Qt support is comming is planned for the end of Dec/2002 + - 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 the X11 API used by + many applications (mozdev.org is just hosting the development area, but + this does not mean the project is limited to mozilla... :) + +- 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 and X.org: + -- snip -- + Copyright (c) + + 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. + -- snip -- + +2. USAGE +- Q: How do I configure Xprint on the client side ? + A: There are two env vars which control Xprint on the client side: + 1. 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. + 2. The env variable ${XPRINTER} defines the default printer used by print + applications. The syntax is either or + @ + - Examples: + 1. % export XPRINTER=ps003 + tells an application to look for the first printer named "ps003" on + all Xprt servers. + 2. % export XPRINTER="hplaser19@littlecat:80" + tells an application to look for the printer "hplaser19" on the Xprt + display "littlecat:80". + * 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 start Xprt ? + A: 1. 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... + + 2. 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}: + -- snip -- + export XPSERVERLIST="`/bin/sh /etc/init.d/xprint get_xpserverlist`" + -- snip -- + See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=171174 + ('"xprint-xprintorg" should automatically populate $XPSERVERLIST') for + further details on this issue... + + 3a. 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... + + 3b. 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). + + 4. 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. + + 5. 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": + -- snip -- + % 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) + -- snip -- + - 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): + -- snip -- + % find /usr/openwin -name fonts.dir | while read i ; do echo + ${i%/fonts.dir} ; done | fgrep -v "models/" + -- snip -- + 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: + -- snip -- + % xplsprinters + printer: hplaserjet001@castor:19 + printer: hpcolor001@castor:19 + printer: laser1@jason:5 + printer: david_dj01@jason:5 + -- snip -- + - Get information about the supported attrbites of printer "ps002": + -- snip -- + % xplsprinters -printer ps002 -l + printer: ps002@castor:18 + comment= + 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 + -- snip -- + +- 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(1))) + and/or per-machine (using "xhost" (see xhost(1)) and/or + /etc/X.hosts ( == display number, e.g. /etc/X0.hosts for + display 0) (see Xserver(1))) + Consult manual pages Xsecurity(7), xhost(1), Xserver(1) 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(1) 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 xlsfonts(1) 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: + -- snip -- + % (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/ + -- snip -- + 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 "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: "spooldir_tmp_Xprintjobs" is a special Xprint printer target which uses + the "PSspooldir" printer model. This model config sends PostScript jobs + to the /tmp/Xprintjobs/ directory instead to a physical printer (quite + usefull for people who want to get the PostScript files as output instead + of printed pages). + +3. CONFIGURATION +- 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: + 1. Adding/modifying the following line to/in + ${XPCONFIGDIR}/C/print/attributes/document sets the default plex for + all printers to "duplex": + -- snip -- + *plex: duplex + -- snip -- + 2. 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": + -- snip -- + *plex: duplex + ps003.plex: simplex + -- snip -- + 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: + 1. Adding/modifying the following line to/in + ${XPCONFIGDIR}/C/print/attributes/document sets the default paper size + for all printers to "na-letter": + -- snip -- + *default-medium: na-letter + -- snip -- + 2. 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": + -- snip -- + *default-medium: na-letter + ps003.default-medium: iso-a4 + -- snip -- + 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: + 1. Adding/modifying the following line to/in + ${XPCONFIGDIR}/C/print/attributes/document sets the default + resolution for all printers to 600 DPI: + -- snip -- + *default-printer-resolution: 600 + -- snip -- + 2. 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: + -- snip -- + *default-printer-resolution: 300 + tekcolor_ps.default-printer-resolution: 1200 + -- snip -- + 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: + 1. Adding/modifying the following line to/in + ${XPCONFIGDIR}/C/print/attributes/document sets the default + orientation for all printers to "portrait": + -- snip -- + *content-orientation: portrait + -- snip -- + 2. 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": + -- snip -- + *content-orientation: portrait + ps003.content-orientation: landscape + -- snip -- + 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. + Task list: + 1. Create a new directory: + % mkdir Xp_dummyfonts + % cd Xp_dummyfonts + 2. Create a fonts.alias file with the following content: + -- snip -- + ! 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. + -- snip -- + 3. 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 + 4. Verify: The directory should now look like this: + -- snip -- + % ls -1 + 6x13.pcf.Z + cursor.pcf.Z + fonts.alias + fonts.dir + -- snip -- + 5. 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 + + | I created a tarball from these instructions, get it from + | http://puck.informatik.med.uni-giessen.de/people/gisburn/work/xprint/fonts/Xp_dummyfonts.tar.gz + | Unpack it and add the new dir to your fontpath) + +- 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 " for each printer . + Example: + -- snip -- + Augment_Printer_List %none% + Printer ps001 + Printer ps003 + Printer hplaser6 + -- snip -- + will add only the printers "ps001", ps003" and "hplaser6". + +- Q: How can I specifc an own program/script to enumerate the printers on by 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 sources (both lines are executed + to support both LPng and CUPS): + % lpc status | awk '/:$/ && !/@/ { print $1 }' | sed -e /:/s/// ; + lpc -a status | awk '/@/ && !/:/ { split( $1, name, \"@\" ); print name[1]; }' + - On AIX v4: + % lsallq | grep -v '^bsh$' + * See xc/programs/Xserver/Xprint/Init.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: + - Adobe: + - Commercial fonts: + http://www.adobe.com/type/main.html + - Free Euro font: + - Single-glyph (e.g. it contains _only_ the euro char) euro font: + http://www.adobe.com/type/eurofont.html or + ftp://ftp.adobe.com/pub/adobe/type/win/all/ + ("eurofont.exe" can be unzipped using "unzip") + - ISO8859-15: + WANTED!! + - Solaris shipps with various PS Type 1 fonts: + - Arabic: + /usr/openwin/lib/locale/ar/X11/fonts/Type1 + ("fonts.dir" and "fonts.scale" missing, maybe they miss the + presentation forms a&b, too [unconfirmed]) + - ISO-8859-13 (Latin 8): + /usr/openwin/lib/locale/iso_8859_13/X11/fonts/Type1 + - ISO-8859-5 (Latin 5): + /usr/openwin/lib/locale/iso_8859_9/X11/fonts/Type1 + - ISO-8859-8/Hebrew: + /usr/openwin/lib/locale/iso_8859_8/X11/fonts/Type1 + (BROKEN, even "type1fix" cannot fix them. Use the hebrew fonts from + http://puck.informatik.med.uni-giessen.de/people/gisburn/work/xprint/fonts/postscript_type_1/PS_Type1_iso8859-8.tar.gz) + - ISO-8859-7/Modern greek: + /usr/openwin/lib/locale/iso_8859_7/X11/fonts/Type1 + - ISO-8859-5/Cryrillic: + /usr/openwin/lib/locale/iso_8859_5/X11/fonts/Type1 + - ISO-8859-4 (Latin 4): + /usr/openwin/lib/locale/iso_8859_4/X11/fonts/Type1 + - ISO-8859-2 (Latin 2): + /usr/openwin/lib/locale/iso_8859_2/X11/fonts/Type1 + - ISO-8859-1 (Latin 1) and Symbol fonts: + /usr/openwin/lib/X11/fonts/Type1/ + - Some of my own collections: + (see http://puck.informatik.med.uni-giessen.de/people/gisburn/work/xprint/fonts/postscript_type_1/): + - KOI8-R: + http://puck.informatik.med.uni-giessen.de/people/gisburn/work/xprint/fonts/postscript_type_1/PS_Type1_koi8-r.tar.gz + - ISO-8859-8/Hebrew: + http://puck.informatik.med.uni-giessen.de/people/gisburn/work/xprint/fonts/postscript_type_1/PS_Type1_iso8859-8.tar.gz + +- 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.). + +- 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 + http://xprint.mozdev.org/bugs/show_bug.cgi?id=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 + http://xprint.mozdev.org/bugs/show_bug.cgi?id=2430 ("RFE: Need tool to + create PMF (printer metrics file) fonts") has been fixed 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.mozdev.org/bugs/enter_bug.cgi?product=xprint&component=Server%3A+Config%3A+model-configs + (e.g. ttp://xprint.mozdev.org/bugs/ , 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 + * 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 AFAIK 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 ? + 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/attributes/*", + "${XPCONFIGDIR}/${LANG}/print/models/*/model-config") + - "Xprinters" (list of printers): + If there is a locale-specific ${XPCONFIGDIR}/${LANG}/Xprinters present + it will be used instead of ${XPCONFIGDIR}/C/Xprinters (e.g. values set + in ${XPCONFIGDIR}/C/Xprinters will be ignored and the values from + ${XPCONFIGDIR}/${LANG}/Xprinters will be used instead). + - Xprt will determinate the locale which should be used based on the + ${LANG}-environment vaiable at startup time. If there is no such + variable set at that time LANG="C" is assumed. + * Notes: + - Attribute values for paper names and orientation names refer to + builtin strings in the DDX code (which are itself based on + international standards), these cannot be changed to your own + "inventions" (it does it make sense to try to "localize" paper names - + "ISO-A4" is "ISO-A4" even in japanese/hebrew/german etc.). + Locale-spefific attribute pools can set their own, different values - + but only within the allowed range of values supported by the DDX and + printers's model-config. + +- Q: Can I execute my own scripts to process the PostScript files generated + by Xprt ? + A: Yes, there are at least two possible solutions: + 1. Create your own model-config which uses a custom "xp-spooler-command" + value - the xprint.mozdev.org's "PSspooldir" model config (see + "${XPCONFIGDIR}/C/print/models/PSspooldir/" and + "${XPCONFIGDIR}/C/print/attributes/printer" and + "${XPCONFIGDIR}/C/print/Xprinters") is a good example for that. + 2. Use an existing "model-config" (which would normally send it's data to + a printer using the default print spooler command) and provide a + custom "xp-spooler-command". + Example (using "SPSPARC2" as printer model and "myscriptprinter" as + name of the printer): + 1. Edit ${XPCONFIGDIR}/C/print/attributes/printer and add these lines + (Xprt will replace "%printer-name%" with the printer's name, + "%copy-count%" with the number of job copies, "%job-name%" with the + job's title and "%options%" with any custom spooler options): + -- snip -- + myscriptprinter.xp-model-identifier: SPSPARC2 + myscriptprinter.xp-spooler-command: -printer %printer-name% -copies %copy-count% -title %job-name% -options "%options%" + -- snip -- + 2. Edit ${XPCONFIGDIR}/C/print/Xprinters and append this line: + -- snip -- + Printer myscriptprinter + -- snip -- + +- Q: How can I disable "spooldir_tmp_Xprintjobs" printer target ? + A: Edit ${XPCONFIGDIR}/C/print/Xprinters and remove or comment-out the line + "Printer spooldir_tmp_Xprintjobs". + Note that Xprt will _NOT_ start if this printer has been removed/disabled + and no other print queue is available (e.g. if "spooldir_tmp_Xprintjobs" + is the only printer target available). + +4. TROUBLESHOOTING +- Q: Xprt refuses to start with the message "sh: lpc: command not found" on + my Linux machine. What does that mean ? + A: Xprt looks up printers using "lpc" on Linux. In this case "lpc" cannot be + found for some reason. + Solution: + Find the place where "lpc" is installed on your machine (some + distributions put it into /usr/sbin, some into /usr/bin) and check + whether your PATH env var includes this directory. + Example (if "lpc" is located in /usr/sbin): + % which lpc + /usr/sbin/lpc + % export PATH=$PATH:/usr/sbin + # Start Xprt ... + % Xprt + +- Q: When the application (=client side) tries to connect to the Xprt + (Xserver) side it fails with a + -- snip -- + Xlib: connection to "meridian:52.0" refused by server + Xlib: Client is not authorized to connect to Server + -- snip -- + What does that mean ? + A: X11 implements access control. You can have host-based, cookie-based (a + "cookie" is used like a passport) or user-based (SecureRPC or Kerberos5) + authentification. Xsecurity(7) has most of the details. + a. No access control: + If you do not want to use access control for Xprt then you can start it + with the option "-ac" (see XSERVER(1)) to disable the access control. + Example: + % Xprt -ac -audit 4 :12 + will start Xprt with access control disabled and with auditing enabled + (e.g. the "-audit 4" option). + WARNING: Disabling the access control will enable _everyone_ who can + access Xprt to print on your printers (that's why the above example + shows how to use auditing, too - that you can see who does something + with Xprt...) !! + + b. Host-based access control: + Host-based access control can be archived using /etc/X.hosts + ( == display number, e.g. /etc/X0.hosts for display 0 (see + Xserver(1) manual page for further details)). + Example: + 1. Add the following line to `/etc/X12.hosts' (assuming you want that + the hosts 'merkur' and 'mars' should be able to access the Xprt + server running as display 12 on your host 'neptun'): + -- snip -- + INET:merkur + INET:mars + -- snip -- + 2. Start Xprt + 3. Verify that Xprt is correctly configured: + -- snip -- + % export DISPLAY=neptun:12 + % xhost + access control enabled, only authorized clients can connect + INET:localhost + LOCAL: + INET:merkur + INET:mars + -- snip -- + +- Q: Xprt refuses to start with the message "failed to set default font path + '...' Fatal server error: could not open default font 'fixed'". + What does that mean ? + A: This means one or more components in the font path (set via the option + "-fp") are either... + - ... not valid + - ... contain fonts not supported by this Xserver (e.g. support has not + be compiled "in" (usually happens for TrueType or F3 fonts (Sunsoft/F3 + fonts are Solaris-specific and _not_ supported by other vendors (AFAIK)) + when support for these fonts was not enabled at build time)) + - ... no font or font alias in the font path matches the name "fixed" + +- Q: Just copying my fonts into a directory and adding the path to my Xprt + command line didn't work - I always get "Fatal server error: could not + open default font 'fixed'". What am I doing wrong ? + A: Every Xserver needs an index file called "fonts.dir" to tell it which + fonts are available in this directory and which properties these fonts + have. + If you are lucky there may be already a "fonts.scale" file which can be + used by "mkfontdir" to create the "fonts.dir" file. + If there is no "fonts.scale" then you have to create your own + fonts.dir/fonts.scale either by hand or via a tool like "type1inst" (see + http://packages.debian.org/stable/utils/type1inst.html) for PS Type1 + fonts and "ttmkfdir" (see + http://packages.debian.org/stable/x11/ttmkfdir.html) for TrueType fonts. + +- Q: Xprt refuses to start with the message "Fatal server error: Cannot + establish any listening sockets - Make sure an X server isn't already + running". What does that mean ? + A: There is already a Xserver running at the display ID you have specified + to start Xprt (for example your framebuffer Xserver runs at ":0" then + Xprt can't run at the same display display). + +- Q: Xprt refuses to start with the message "Fatal server error: Failed to + establish all listening sockets". What does that mean ? + A: This means that the Xserver could not open one of it's sockets. Check + the permission of /tmp/.X11-pipe and /tmp/.X11-unix (on Solaris a + Xserver must run set-gid "root" to access these directories). + Either fix the permission or start Xprt with the option "-pn". Using this + option requires to access the server _always_ with + : (see Xserver(1) manual page for the side-effects + of this option). + +- Q: Xprt refuses to start with the message "Fatal server error: could not + open default font 'fixed'" or "Fatal server error: could not open default + cursor font 'cursor'". + A: All Xservers at least two fonts as the minimum: One fixed-width font + ("fixed") and one font for the cursor ("cursor"). Be sure that the font + path contains these fonts. + I created a tarball which contains only these two fonts, get it from + http://puck.informatik.med.uni-giessen.de/people/gisburn/work/xprint/fonts/Xp_dummyfonts.tar.gz + +- Q: Xprt refuses to start with the message "Fatal server error: no screens + found". What does that mean ? + A: This means that Xprt could not find any printers. Either there are no + printers installed, "lpstat"/"lpc" could not find any printers or the + configuration does not contain any manual printer configurations + (see Q/A item "Which program is used by default by Xprt to enumerate the + printers on my system" for further details...). + + Two solutions: + 1. Using "PSspooldir" model: + Xprt releases from http://xprint.mozdev.org/ provide the "PSspooldir" + model config for such cases. Just edit the "Xprinters" and add + this line: + -- snip -- + Printer spooldir_tmp_Xprintjobs + -- snip -- + this will add the pre-configured (see + ${XPCONFIGDIR}/C/print/attributes/printer) "spooldir_tmp_Xprintjobs" + printer which will send jobs to the directory "/tmp/Xprintjobs/" + instead to a printer queue. + (This feature was added in the xprint.mozdev.org release 007, see + http://xprint.mozdev.org/bugs/show_bug.cgi?id=2475 ("RFE: Need + model-config which spools print jobs in a predefined directory")) + + 2. Manual setup: + Step 1: Provide a simple "Xprinters" spec file which contains a dummy + queue. + Example: + # Create "Xprinters_onlydummy" file which turns autolookup of printers + # OFF (using "Augment_Printer_List %none%") and provides one dummy + # queue called "ps_myscript" instead (using "Printer ps_myscript") + % echo "Augment_Printer_List %none%" >Xprinters_onlydummy + % echo "Printer ps_myscript" >>Xprinters_onlydummy + Step 2: Edit ${XPCONFIGDIR}/C/print/attributes/printer and add these + two lines: + -- snip -- + ps_myscript.xp-model-identifier: PSdefault + ps_myscript.xp-spooler-command: /home/sanja/xprint_test/my_xprt_cat_script.sh + -- snip -- + This means that the printer "ps_myscript" now uses the "PSdefault" + printer model and it will feed the jobs to the script + "/home/sanja/xprint_test/my_xprt_cat_script.sh" (via stdin). + Note that the absolute path is required for "*xp-spooler-command". + Step 3: Start Xprt on display 18, passing the "Xprinters_onlydummy" + using the "-XpFile" option: + % Xprt -XpFile ./Xprinters_onlydummy -pn -ac -audit 4 :18 + +- Q: "Printing itself works but the printout covers only 1/4 of the paper + - what am I doing wrong ?" + A: This is usually an indicator for a wrong DPI setting. The default + "PSdefault" model config uses 300 DPI but some printers only support + 600 DPI. + - Workaround: + Edit ${XPCONFIGDIR}/C/print/attributes/document and replace the line + "*default-printer-resolution: 300" with + "*default-printer-resolution: 600" + (Note that locale-specific settings in + ${XPCONFIGDIR}/${LANG}/print/attributes/document always override values + set in ${XPCONFIGDIR}/C/print/attributes/document.) + - Solution: + Create a model-config for your printer which only contains attributes + supported by your printer ("printer-resolutions-supported" is the + attribute in the "model-config" which holds the space-seperated list + of DPI values which are supported by the printer). + +- Q: "Printing works but I get large borders/margins..." / "[Top] margin is too small" / + "Margins are wrong" / etc. + A: Two possible causes: + - Usually same issue as "Printing itself works but the printout covers + only 1/4 of the page"-issue: Wrong DPI. + Solution: Check the DPI value and adjust it as described in the FAQ item + above. Common DPI values for the PostScript DDX are 240, 300, 360, 400 + and 600 DPI. + - You are trying to print "US-letter" on a "DIN-A4" paper or "DIN-A4" on + "US-letter". + Solution: Check your paper settings + Note that the default papersize for Xprt depends on the locale + (e.g. on the env var ${LANG}) Xprt is running in - "en_US"&co. get + US-letter, all others use DIN-A4 (incl. german/austrian etc. locales)). + Exception from this rule: If the selected printer does not support the + default paper size it will set no default paper size for this printer + (then the application side has to make an explicit choice). + +- Q: Xprt prints a warning like "Xp Extension: could not find config dir + /usr/X11R6/lib/X11/C/print" - what does that mean ? + A: This is actually the worst case what can happen. + The message indicates that Xprt was unable to find it's configuration + data. + Solution: + - Install configuration data at the requested location + OR + - Set the ${XPCONFIGDIR} env var to the location of the Xprt + configuration directory. + +- Q: Xprt crashes with "Fatal server error: Beziers this big not yet supported" + What does that mean ? + A: This is a known issue in the X11R6.5.1 code. In rare cases some PostScript + Type1 fonts can trigger this. + See "My PS Type1 font does not work with my Xserver" ... + +- Q: "My PS Type1 font does not work with my Xserver - how can I fix this ?" + A: Some PS Type1 do not work out-of-the-box with all PS Type1 font engines - + some will work with the Adobe font engine (used in Solaris Xsun) but not + with the X.org font engine (or the other way round) or the fonts are + simply broken. + + The following procedure will try to fix this problem: + Get the "type1fix" perl script the TeXTrace package + (http://www.inf.bme.hu/~pts/textrace-latest.tar.gz) and run it over + the fonts. + + Example 1 (filter fonts): + # Broken PFA fonts are in broken_fonts/ + % mkdir fixed_fonts ; cd fixed_fonts + % for i in ../broken_fonts/*.pfa ; do + echo " ------- $i" ; + type1fix.pl --ofmt=pfa --infile=$i --outfile=$(basename ${i}) ; + done + + Example 2 (filter fonts and convert them to PFB on-the-fly; do not forget + to update "fonts.scale" and run "mkfontdir" (to update "fonts.dir") ; + systems which use the Adobe font engine (like Solaris/Xsun) may require + to run "makepsres", too): + # Broken PFA fonts are in broken_fonts/ + % mkdir fixed_fonts ; cd fixed_fonts + % for i in ../broken_fonts/*.pfa ; do + echo " ------- $i" ; + type1fix.pl --ofmt=pfb --infile=$i --outfile=$(basename ${i%.pfa}.pfb) ; + done + +- Q: I can't get it working. I have set ${DISPLAY} correctly to point to the + Xprt display and... ... What is going wrong ? + A: Do not set ${DISPLAY} to the Xprt server. You still need your normal + Xserver for your video card - Xprt is only for your printer(s). + Applications look up Xprt servers via the ${XPSERVERLIST} env var, _NOT_ + via the ${DISPLAY} env var. + +- Q: When I try to print via Xprint I get the message "Fatal server error: + unable to exec '/usr/bin/lp'". What is going wrong here ? + A: It usually means that the spooler application "/usr/bin/lp" would not be + launched. This is usually the result when /usr/bin/lp does not exist or + cannot be executed (for example, shell scripts without the +x flag etc.). + +- Q: The Solaris Xprt prints some error messages about PostScript fonts like + "FOOBAR not found, using Courier. CMEX0123 not found, using Courier." + etc. and uses "Courier" instead of these fonts... + A: The Solaris (Adobe-based) PostScript font engine requires a "PostScript + resource database" file named "PSres.upr" to use the PostScript fonts + correctly. + * Solution: + Steps to create the missing file: + 1. Go to the location where the matching fonts are installed (we're using + /home/sanja/mathml_fonts/tex_cmps/Type1/ in this example): + % cd /home/sanja/mathml_fonts/tex_cmps/Type1/ + 2. Create "PSres.upr" using the "makepsres" resource file + % makepsres + 3. Validation: + Make sure the file has been created: + % ls -l PSres.upr + 4. Restart Xprt server(s): + % /etc/init.d/xprint restart + 5. Restart application which uses these fonts + + The makepsres(1) manual page has some additional details about this + subject... + +- Q: "Xprt refused to start, complaining about a missing dir + (/etc/X11/xserver/C/print directory)... I created it by hand (empty) and + started Xprt but it still does not work properly..." + A: Xprt expects some config data in this directory. Just making it an + existing but empty dir will work around the error message but will not + result in a properly working Xprt since it has no (usefull) builtins + which would make it possible to run the binary without the config data. + Your X11 binary distribution should always come with the config data + (for example /usr/openwin/server/etc/XpConfig/ on Solaris) or you won't + be able to use Xprint (however it is possible to copy the config data + from another system :) + BTW: Source for the configs can be found under xc/programs/Xserver/XpConfig + +- Q: My Linux system already shipps with a '/usr/X11R6/bin/Xprt'-binary. + Do I need the binary distribution from http://xprint.mozdev.org/ ? + A: This depends on what is shipped with your Linux distribution. + Please check the "vendor" string of the Xprt server: + % Xprt :10 & + % xdpyinfo -display :10 | grep -i "vendor string" + If this outputs a line like "vendor string: The XFree86 Project, Inc" + then you have the Xprt binary build from Xfree86 sources - which are + broken - even the newest version [I'll update this as soon as Xfree86 + shipps with a working version]. + Xprt from Solaris, HP-UX and my own builds (which identifies itself as + "vendor string: xprint.mozdev.org" for releases >= 007, older releases + (e.g. <= 006) identify itself as as "vendor string: The X.Org Group") + are known to work proprtly. + +- Q: I am getting the error message "error opening security policy file + /usr/X11R6/lib/X11/xserver/SecurityPolicy". What does that mean ? + A: The policy file for the SECURITY extension cannot be found. + This is not serious unless you want to make use of features of the + SECURITY extensions (like treating clients as "untrusted", e.g. restrict + their access to certain Xserver resources). + Normally the missing policy file is a problem with your Unix/Linux X11 + distribution; consult your vendor where to get the missing file from. + Alternatively you can get the plain X11R6.6 security policy file from + ftp://ftp.x.org/pub/R6.6/xc/programs/Xserver/Xext/SecurityPolicy (copy it + to the matching location - but be sure that you do not overwrite any + existing security policy file). + +- Q: I have modified the "HPLJ4family" [or "HPDJ1600C" etc.] printer model to + work with my PostScript printer, but when I print I get empty places + where some text should be - what am I doing wrong here ? + A: The "HPLJ4family" and "HPDJ1600C" models are PCL-only, check + the model-config spec + (${XPCONFIGDIR}/C/print/models/${MODEL_NAME}/model-config) - if the + "xp-ddx-identifier" attribute says something with "PCL" (like + "XP-PCL-MONO" etc.) in the value string then this model-config is for + the PCL-DDX _only_ (e.g. their PMF fonts do not supply the neccesary + information (e.g. the "_ADOBE_POSTSCRIPT_FONTNAME" chunk is missing; + they only provide the "PCL_FONT_NAME" chunk) nor are these fonts + accessible via the PostScript-support in these printers. + A solution is to use the "PSdefault" model instead (and/or create your + customized own version of this model) - or look if there is a + model-config beginning with the same name and ending with "PS" (e.g. + "HPLJ4family-PS"). + +- Q: Xprt outputs warning messages like: + -- snip -- + Xp Extension: Can't load driver XP-PCL-MONO + init function missing + Xp Extension: Can't load driver XP-RASTER + init function missing + -- snip -- + What does that mean ? + A: Two possible problems: + 1. The requested driver is not supported by that version of Xprt. + For example Solaris 2.7 Xprt does not support XP-PCL-MONO nor the + XP-RASTER driver. + Valid values for the "xp-ddx-identifier" attribute in + ${XPCONFIGDIR}/*/print/attributes/printers and/or + ${XPCONFIGDIR}/*/print/models/*/model-config are + - Solaris 2.7: XP-POSTSCRIPT and XP-PCL-COLOR + - Solaris >=2.8: XP-POSTSCRIPT, XP-PCL-COLOR, XP-PCL-MONO and XP-RASTER + - HP-UX: XP-POSTSCRIPT, XP-PCL-COLOR, XP-PCL-MONO, XP-PCL-LJ3, + XP-PCL-DJ1200 and XP-RASTER + - xprint.mozdev.org release 007: XP-POSTSCRIPT and XP-RASTER + - xprint.mozdev.org release 008: XP-POSTSCRIPT, XP-PCL-COLOR, + XP-PCL-MONO, XP-PCL-LJ3 and XP-RASTER + - xprint.mozdev.org release >=1.0 (planned): XP-POSTSCRIPT, XP-PCL-COLOR, + XP-PCL-MONO, XP-PCL-LJ3, XP-RASTER and XP-PDF + 2. There may be too many drivers loaded into one Xprt instance. + By default a single Xserver instance can only handle three screens - and + since one Xprint DDX maps to one Xserver screen this limit applies to + the number of loaded Xprt drivers, too. + Starting with xprint.mozdev.org release 008 the per-Xserver screen limit + was increased from "3" to "8" to avoid this issue... + Workaround: Start a 2nd instance of Xprt which handles the other + drivers which do not fit into the first instance. + +- Q: Printing on Solaris with Mozilla/Eclipse [or any other Xprint client] + removes spaces between words. What is going wrong ? + A: This is a bug in the Solaris Xprint server binary (/usr/openwin/bin/Xprt). + Various bug reports have been filed, see + - http://xprint.mozdev.org/bugs/show_bug.cgi?id=3353 ("Solaris Xprt looses + space when rendering with '-monotype-arial-*'-fonts") + - http://bugzilla.mozilla.org/show_bug.cgi?id=199957 ("Solaris 8 Mozilla + removes spaces for text within ...") + Known workarounds: + - Remove the '-monotype-arial-*' fonts from the font path + - Use an alternate Xprint server like available in the "GISWxprint" package + (this package is identical to the "GISWxprintglue" package except that it + uses a Xprint server build from xprint.mozdev.org sources and not the + /usr/openwin/bin/Xprt binary from Solaris) + - Mozilla-only: Adding + -- snip -- + user_pref("print.xprint.font.rejectfontpattern", + "fname=-dt-.*;scalable=.*;outline_scaled=false;xdisplay=.*;xdpy=.*;ydpy=.*;xdevice=.*|" + + "fname=-monotype-arial.*;scalable=.*;outline_scaled=.*;xdisplay=.*;xdpy=.*;ydpy=.*;xdevice=.*"); + -- snip -- + to prefs.js works around the problem (see + http://bugzilla.mozilla.org/show_bug.cgi?id=199957#c6 , too). + +5. SOFTWARE DEVELOPMENT +- Q: How can I get the printable area (e.g. the portion of the page on which + the printer is physically capable of placing ink) of the paper after I + have chosen a paper ? + A: XpGetPageDimensions() returns the printable area and other information + about the page geometry. + +- Q: Do "offscreen" pixmaps work on Xprt ? + A: Yes, "offscreen" pixmaps are working on Xprt. + +- Q: How can I get the DPI value for the current Xprt server ? Can I use the + values from "xdpyinfo" ? + A: The Xprt screen resolution defines only the maximum resolution configured + for the matching DDX, the printers real DPI is obtained via an another + API (XprintUtil has a bunch of functions to get/set the document/page + resolution, see XpuGetResolutionList(), XpuFreeResolutionList(), + XpuGetResolution(), XpuSetPageResolution(), XpuSetDocResolution() and + XpuFindResolution()). + +- Q: Does Xprint/Xprt support font rotation ? + A: Yes - Xprint/Xprt supports font rotation at any angle via the matrix XLFD + enhancement (this even works for printer-builtin fonts !!). For details + see the paper "New Font Technology for X11R6" by Nathan Meyers . + Short: + The transformation-matrix for rotation can be calculated like this: + +-- --+ + | cos(angle) sin(angle)| + | | + |-sin(angle) cos(angle)| + +-- --+ + Examples: + 1. the following code fragment obtains a 180 degree rotated font (matrix [-1 0 0 -1]): + -- snip -- + ... = XLoadQueryFont(..., "-adobe-courier-bold-r-normal--*-[~24 0 0 ~24]-0-0-m-*-iso8859-1"); + -- snip -- + 2. the following code fragment obtains a 90 degree rotated font (matrix [0 1 -1 0]): + -- snip -- + ... = XLoadQueryFont(..., "-adobe-courier-bold-r-normal--*-[0 24 ~24 0]-0-0-m-*-iso8859-1"); + -- snip -- + +- Q: When I render something on my window and call XpStartPage() all the + rendered stuff is gone, I only get a white, empty paper. + What is going wrong here ? + A: Remember the rule that "only those drawings are printed on the paper which + were rendered between XpStartPage() and XpEndPage()". + XpStartPage() clears the window you passed as argument, e.g. it creates + a new, blank sheet of paper where you can do your rendering stuff on. + XpEndpage() then pushes the "paper sheet" to the stash of papers from the + document in process. + Solution - if you want to render something once for multiple or all pages: + Render on a offscreen pixmap and copy (with XCopyArea()) the content to + the "paper" drawable (after calling XpStartPage()) - XpStartpage() only + affects the window passed as parameter. + +- Q: What is XpStartDoc() for ? + A: ISO 10175 and some advanced printing systems by IBM and HP had set forth + the standard that a "Job" is made up of one or more "Documents", and + each document is made up of one or more "Pages". Xprint was designed that + in a true ISO 10175 environment/implementation (lp(1) on steroids, and + with an API), Xprt can actually learn about all printers and their + capabilities though API's into the printer subsystem (vs. using config + files), map Job/Doc/Page directly into ISO 10175 equivalents, and use + APIs to view job status and kill jobs (vs. cancel(1), lpcancel(1), + lpstatus(1)). + Because most applications of the day are only printing one document per + job, XpStartPage() was designed that it generates a "synthetic" + XpStartDoc() if it has not been called yet. + +- Q: How does the XLFD for printer-builtin fonts look like ? + A: XXX + +- Q: How can I scale images using the Xprint API ? + A: XXX + +- Q: How do I use the XprintUtil library ? + A: XXX + +- Q: Why does XGetImage() not work for Xprt ? + A: There are at least two reasons why XGetImage() does not work for Xprt: + 1. Most of the Xprt DDX implementations do not render itself on any + bitmaps like the framebuffer(=video) DDX do, they translate the + rendering commands into the matching commands of the printer language + (it is technically possible to implement such support for XGetImage() + even for those drivers - but there is reason [2]:) + 2. Xprt usually operates at high resolutions which results in very large + dimensions. If a client would request the 24bit TrueColor _bitmap_ + data for a _whole_ DIN-A4 page at 2400 DPI a data chunk of ~173 + megabytes would be the response. This would be more or less a + DOS(=Denial of Service) for either the client, the network and/or the + server. + +- Q: How to print with Xt/Athena widgets ? + A: XXX + +- Q: How to print with Xt/Motif widgets ? + A: XXX + +- Q: What are the differences between normal display and Xprint display ? + A: XXX + +- Q: How can I find/identify printer-builtin fonts ? + A: XXX + +- Q: How do I scale images ? + A: XXX + +- Q: libXp Image scaling vs. max. request size ? + A: XXX + +- Q: How can I use XprintUtils ? + A: XXX + +- Q: How do I calculate the DPI values for Xprt DDX screens ? + A: XXX + +- Q: How do I find scaleable fonts ? + A: XXX + +- Q. How do I find printer-builtin fonts ? + A: XXX + +- Q: The XLFD for printer-builtin fonts look like bitmap fonts - is that bad ? + A: XXX + +- Q: When can I use printer-buildin fonts ? + A: XXX + +- Q: Where can I find examples fir adding Xprint support to my Xt/Athena application ? + A: XXX + +- Q: Where can I find examples fir adding Xprint support to my Xt/Motif application + (without the need for CDE's DtPrint library) ? + A: XXX + +- Q: Where can I find examples fir adding Xprint support to my Qt application ? + A: XXX + + +6. KNOWN BUGS: + ('P'=Problem, 'S'=Solution) + - P: Xprt build from Xfree86 sources is completely broken and unuseable. + S: Build Xprt from the CVS tree at http://xprint.mozdev.org/ or the + X.org X11R6.5.1 sources (note that the client side Xprint extension + library ("libXp.so") from Xfree86 is not broken and do not need to be + replaced). + + - P: The code which matches XLFD names to PS Type1 font names is + case-sensitive in Xprts build from X.org X11R6.5.1/X11R6.6 and the + current Solaris Xprt. This may cause that the PS DDX refuses to + download PS Type1 fonts. + S: Patch available, I am looking for a way to get the patch into the X11 + and Solaris source trees... + + - P: Xprt build from X11R6.5.1/X11R6.6 sources and Solaris's version of + Xprt can only download PFA (PS ASCII font) fonts which ends of the + ending "*.pfa". + S: Either convert PFB (PS Type 1 binary font) to PFA format and adjust + the fonts.dir and fonts.scale file or get a patch for the sources. + I am looking for a way to get the patch into the X11 and Solaris + source trees (the fixed version can download both PFA/PFB fonts in + PFA format and even handles non-standard file extensions). + + - P: There is an issue how the Linux and Solaris Xprt handles the + "copy-count" of a print job. The result may be that a job with n + copies of a document end-up in n jobs with n copies (usually equals + to n^2 copies). + S: Xprt build from xprint.mozdev.org sources has been fixed in release + 007, see http://xprint.mozdev.org/bugs/show_bug.cgi?id=1378 ("PS DDX + creates n^2 copies of a job instead of n copies") and + http://bugzilla.mozilla.org/show_bug.cgi?id=140030 ("Setting number + of copies causes too many copies to print") for details. + Solaris 2.7 Xprt still suffers from this issue... ;-( + + XXX XXX XXX + +7. UNANSWERED QUESTIONS + (My small ToDo list what I will write soon; 379 items missing... =:-) + Email me if you want one of these answered "now" and/or to contribute + an answer... :) + - Q: How do I create a model-config for my printer ? + - Q: How can I customize a model-config for my site/machine ? + - Q: Which attributes/values can be set in a model-config ? + - Q: Why can't I set default values (for my {paper size, resolution, ...}) + in the model-config ? + - Q: Should I add the fonts in the model-config dir to the Xserver's + font path ? + - Q: What are the fonts in the model-config dir for ? + - Q: Can I use a font server for all fonts instead of passing then directly + to the Xprint server ? + - Q: Does the Xprint PostScript driver do full rasterisation of the + print job ? + - Q: Is it possible to prepare a printer config entry so that the PS output + is piped to "ps2pdf" and will produce directly a PDF file? It would be + nice to have mozilla directly producing PDF files when printing. + - Q: Problem: I have changed the Xprt config - but "xplsprinters -l" + (or any other Xprint application) does not show the change. + Any idea what I am doing wrong ? + - Q: How can I add a font path to Xprt ? + - Q: Why does "xset +fp path_to_font" not work in some cases ? + - Q: How can I get a "core"-dump when Xprt crashes ? + - Q: How can I debug Xprt (hint: use "-audit 4") ? + - Q: How can I debug Xprt with Sun Workshop (hint: "check -access") ? + - Q: How can I check whether Xprint is "active" ? / How can I verify that a Xprint is working ? + + XXXX XXXX XXXX + +8. ACKNOWLEDGEMENTS + We'd like like to express their gratitude to the whole community for + providing insightful answers to innumerable questions. In particular, + the following people (listed alphabetically) have contributed to this + FAQ (apologies, in advance, if anyone has been forgotten): + + Alan Coopersmith + Thomas Gilg + Jay Hobson + Masaki Katakai + Simon Montagu + Drew Parsons + (and many many others) + +# EOF. + + Index: xc/doc/hardcopy/XPRINT/docbook.css =================================================================== RCS file: xc/doc/hardcopy/XPRINT/docbook.css diff -N xc/doc/hardcopy/XPRINT/docbook.css --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/doc/hardcopy/XPRINT/docbook.css 21 Apr 2004 09:33:57 -0000 @@ -0,0 +1,570 @@ + +/* Catch-all */ +* { display: inline; } + +/* + * Headers + */ +bookinfo, bookinfo > *, +articleinfo, articleinfo > * { + display: block; +} + +address > * { + display: block; +} + +copyright { + margin: 0.5cm; + text-align: center; + font-weight: bold; +} + +year:before { + content: "Copyright \00a9 "; +} + +phone:before { + content: "Tel: "; +} + +fax:before { + content: "Fax: "; +} + +email:before { + content: "Email: "; +} + +address *, +authorgroup * { + text-align: center; + display: block; +} + +productname { + display: none; +} + +/* + * Basic elements + */ +set, book, article, preface, chapter, appendix, bibliography, +section, sect1, sect2, sect3, sect4, sect5, +title, subtitle, simpara, para, +itemizedlist, orderedlist, glosslist, glossentry, glossterm, variablelist, +mediaobject, imageobject, imagedata, caption, example, informalexample, screen, programlisting, footnote +{ + display: block; + font-family: serif; +} + +para { + text-align: justify; +} + +set { +/* + background-image: url("citeclogo.png"); +*/ + background-color: white; + background-repeat: no-repeat; + color: black; + padding-top: 60px; +} + +set, book, article { + margin-right: 0pt; + padding-right: 0pt; +} + +book:before, article:before { +/* + content: url(citec-globe.png); +*/ +} + +glossentry, varlistentry { + padding-left: 2em; +} + +glossdef, +glossdef > para { + display: inline; + margin-left: 0pt; +} + +varlistentry > listitem { + display: block; +} + +varlistentry > term { + margin-right: 1em; + position: relative; + left: -2em; +} + +glossterm { + margin-right: 1em; + position: relative; + left: -1em; +} + +sect1, sect2, sect3, sect4, sect5, section, para, itemizedlist, orderedlist, variablelist { + margin: 0.5em; + margin-right: 0pt; + padding: 0.5em; + padding-right: 0pt; +} + +sect2 { + margin-top: 3ex; + padding-top: 0pt; + margin-bottom: 3ex; + padding-bottom: 0pt; +} + +sect2 { + margin-left: 0.5em; + padding-left: 0.5em; + border-left: 10px solid lightgrey; +} + +title { + display: block; + font-family: sans-serif; + font-size: larger; + font-weight: bold; + text-align: left; +} + +example * { + background-color: transparent; + color: #8b0000; + font-weight: normal; +} + +example literallayout { + background-color: transparent; + color: black; +} + +example > title { + font-size: medium; + text-decoration: underline; + margin-bottom: 1ex; +} + +example > title:after { + content: ":"; +} + +book > * > title, +article > * > title { + font-size: xx-large; +} + +book > * > * > title, +article > * > * > title { + font-size: x-large; +} + +book > * > * > * > title, +article > * > * > * > title { + font-size: large; + font-weight: bold; +} + +book > * > * > * > * > title, +article > * > * > * > * > title { + font-size: larger; + font-weight: normal; +} + +book > * > * > * > * > * > title, +article > * > * > * > * > * > title { + font-size: medium !important; + font-weight: normal !important; +} + +title + subtitle { + display: block; + font-weight: bold; + font-size: smaller; +} + +book > title, +article > title, +book > subtitle, +article > subtitle { + text-align: center; + font-size: xx-large; + font-weight: bold; + padding-top: 1ex; + padding-left: 2em; + padding-right: 2em; + margin-top: 1ex; + margin-bottom: 1ex; +} + +book > subtitle, +article > subtitle { + font-size: x-large; + font-style: italic; +} + +preface, chapter, appendix, bibliography { + padding: 1em; + padding-top: 2ex; + border-top: 8px solid #bebebe; + page-break-before: always; +} + +preface:before { + content: "Preface:"; + font-size: large; + font-style: italic; +} + +appendix:before { + content: "Appendix:"; + font-size: large; + font-style: italic; +} + +preface > *, chapter > *, appendix > *, bibliography > * { + margin-right: 1em; +} + +itemizedlist > *, +orderedlist > * { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +itemizedlist > listitem, +orderedlist > listitem { + display: list-item; + position: relative; + left: 1em; +} + +varlistentry { + display: list-item; + list-style-type: none; +} + +listitem > para { + margin: 0pt !important; + padding: 0pt !important; +} + +itemizedlist > listitem > itemizedlist > listitem { + list-style-type: circle; +} + +orderedlist > listitem { +/* list-style-type: decimal; */ + list-style-type: square; +} + +glossterm, term { + font-weight: bold; +} + +note, note * { + color: #505000; + background-color: transparent; +} + +note { + display: block; + margin: 1em; + padding: 0.3em; + border: 2px dotted #505000; +} + +quote { + font-style: italic; +} + +mediaobject { + text-align: center; +} + +entry[morerows] { + background-color: lightgreen; + color: black; + font-weight: bold; +} + +entry { + font-family: sans-serif; +} + +thead entry { + font-weight: bold; + font-size: larger; + background-color: #bebebe; + color: white; +} + +superscript { + vertical-align: super; + font-size: smaller; +} + +emphasis { + font-style: italic; +} + +@media print { + ulink:after { + content: " [URL: " attr(url) "]"; + } +} + +computeroutput, userinput { + font-family: monospace; + font-weight: bold; + text-align: left; + white-space: inherit; +} + +literallayout, programlisting { + font-family: monospace; + white-space: pre; +} + +informalexample, example, programlisting { + border: 2px dotted darkred; + padding: 0.5em; + margin: 0.5em; +} + +footnote { + float: right; + width: 50%; + font-size: smaller; + margin: 0.5em; + margin-right: 0pt; + padding: 0.5em; + border: 1px solid darkred; +} + +footnote > * { + margin: 0pt; + padding: 0pt; +} + +programlisting, example { + clear: right; +} + +/* ---------------------------------- */ +abbrev, accel, acronym, action, application, artpagenums, authorinitials, +bibliocoverage, biblioid, bibliomisc, bibliorelation, bibliosource, citation, +citebiblioid, citerefentry, citetitle, city, classname, co, command, +computeroutput, constant, coref, country, database, date, email, emphasis, +envar, errorcode, errorname, errortext, errortype, exceptionname, fax, +filename, firstname, firstterm, funcdef, funcparams, function, group, +guibutton, guiicon, guilabel, guimenu, guimenuitem, guisubmenu, hardware, +honorific, initializer, inlineequation, inlinegraphic, inlinemediaobject, +interface, interfacename, invpartnumber, isbn, issn, keycap, keycode, +keycombo, keysym, lineage, lineannotation, link, literal, markup, medialabel, +member, menuchoice, methodname, methodparam, modifier, mousebutton, olink, +ooclass, ooexception, oointerface, option, optional, orgdiv, orgname, +otheraddr, othername, pagenums, paramdef, parameter, phone, phrase, pob, +postcode, productname, productnumber, prompt, property, pubdate, pubsnumber, +quote, refpurpose, replaceable, returnvalue, revnumber, seriesvolnums, +sgmltag, shortcut, state, street, structfield, structname, subscript, +superscript, surname, symbol, systemitem, token, trademark, type, ulink, +userinput, varname, volumenum, wordasword, year { + display:inline; +} + +abstract, ackno, address, answer, appendix, article, attribution, authorblurb, +bibliodiv, biblioentry, bibliography, bibliomixed, bibliomset, biblioset, +blockquote, book, callout, calloutlist, caption, caution, chapter, +cmdsynopsis, colophon, constraintdef, dedication, epigraph, equation, example, +figure, formalpara, glossary, glossdef, glossdiv, glossentry, glosslist, +graphic, graphicco, highlights, imageobjectco, important, index, indexdiv, +indexentry, informalequation, informalexample, informalfigure, informaltable, +itemizedlist, legalnotice, listitem, lot, lotentry, mediaobject, +mediaobjectco, msg, msgentry, msgexplan, msgmain, msgset, note, orderedlist, +para, part, partintro, personblurb, preface, primaryie, printhistory, +procedure, productionset, programlistingco, qandadiv, qandaentry, qandaset, +question, refentry, refentrytitle, reference, refnamediv, refsect1, refsect2, +refsect3, refsection, refsynopsisdiv, revhistory, screenco, screenshot, +secondaryie, sect2, sect3, sect4, sect5, section, seealsoie, seeie, set, +setindex, sidebar, simpara, simplemsgentry, simplesect, step, substeps, +subtitle, synopfragment, synopfragmentref, table, term, tertiaryie, tip, +title, toc, tocback, tocchap, tocentry, tocfront, toclevel1, toclevel2, +toclevel3, toclevel4, toclevel5, tocpart, variablelist, varlistentry, warning, +sect1 { + display:block; +} + +appendixinfo, area, areaset, areaspec, articleinfo, bibliographyinfo, +blockinfo, bookinfo, chapterinfo, colspec, glossaryinfo, indexinfo, itermset, +modespec, objectinfo, partinfo, prefaceinfo, primary, refentryinfo, +referenceinfo, refmeta, refsect1info, refsect2info, refsect3info, +refsectioninfo, refsynopsisdivinfo, screeninfo, secondary, sect1info, +sect2info, sect3info, sect4info, sect5info, sectioninfo, see, seealso, +setindexinfo, setinfo, sidebarinfo, spanspec, tertiary { + display:none; +} + +classsynopsisinfo, funcsynopsisinfo, literallayout, programlisting, screen, +synopsis { + white-space:pre; + font-family:monospace; + display:block; +} +/* + * CSS2 styling for DocBook XML + */ + +article, book { + margin:.5em; +} + +title { + font-weight:bolder; + margin-top:1em; + margin-bottom:.5em; + font-family:sans-serif; +} +section>* { + margin-left:10%; + margin-right:10%; +} +section>section, section>title { + margin-left:0; + margin-right:0; +} + +book>title, article>title { + font-size:xx-large; + text-align:center; + border-bottom-style:solid; +} + +chapter>title { + font-size:xx-large; + text-align:center; +} + +section>title { + font-size:xx-large; +} + +section>section>title { + font-size:x-large; + margin-left:5%; +} + +section>section>section>title { + font-size:large; + margin-left:7.5%; +} + +section>section>section>section>title { + margin-left:10%; +} + +section>section>section>section>section>title { + font-size:normal; + margin-left:10%; +} + + +*+para { + margin-top:.5em; +} + +example, informalexample { + background-color:#dddddd; +} + +quote:before { + content: open-quote; +} + +quote:after { + content: close-quote; +} + +question, answer { + margin-top:.5em; + display:list-item; +} + +question>para, answer>para { + display:inline; +} + +question:before { + display:marker; + content:"Q: "; + font-weight:bolder; +} + +answer:before { + display:marker; + content: "A: "; + font-weight: bolder; +} + +emphasis { + font-style:italic; +} + +sgmltag[class="starttag"]:before { + content: "<" +} + +sgmltag[class="starttag"]:after { + content: ">" +} + +sgmltag[class="endtag"]:before { + content: "" +} + +keycap+keycap:before { + content:"-" +} + +ulink { + color:#0000ff; + text-decoration:underline; +} +ulink:hover { + cursor:pointer; +} + +blockquote { + padding-left:3em; +} + +attribution { + text-align:right; +} +attribution:before { + content:"--" +} + +itemizedlist>listitem { + display:list-item; +} + +filename, literal { + font-family:monospace; +} + +/* EOF. */ Index: xc/doc/hardcopy/XPRINT/dtprint_fspec.PS.gz =================================================================== RCS file: xc/doc/hardcopy/XPRINT/dtprint_fspec.PS.gz diff -N xc/doc/hardcopy/XPRINT/dtprint_fspec.PS.gz Binary files /dev/null and dtprint_fspec.PS.gz differ Index: xc/extras/freetype2/include/freetype/config/ftoption.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/config/ftoption.h,v retrieving revision 1.1.4.2 diff -u -r1.1.4.2 ftoption.h --- a/xc/extras/freetype2/include/freetype/config/ftoption.h 15 Apr 2004 10:14:27 -0000 1.1.4.2 +++ b/xc/extras/freetype2/include/freetype/config/ftoption.h 21 Apr 2004 09:34:23 -0000 @@ -25,501 +25,501 @@ FT_BEGIN_HEADER - /*************************************************************************/ - /* */ - /* USER-SELECTABLE CONFIGURATION MACROS */ - /* */ - /* This file contains the default configuration macro definitions for */ - /* a standard build of the FreeType library. There are three ways to */ - /* use this file to build project-specific versions of the library: */ - /* */ - /* - You can modify this file by hand, but this is not recommended in */ - /* cases where you would like to build several versions of the */ - /* library from a single source directory. */ - /* */ - /* - You can put a copy of this file in your build directory, more */ - /* precisely in "$BUILD/freetype/config/ftoption.h", where "$BUILD" */ - /* is the name of a directory that is included _before_ the FreeType */ - /* include path during compilation. */ - /* */ - /* The default FreeType Makefiles and Jamfiles use the build */ - /* directory "builds/" by default, but you can easily change */ - /* that for your own projects. */ - /* */ - /* - Copy the file to "$BUILD/ft2build.h" and modify it */ - /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ - /* locate this file during the build. For example, */ - /* */ - /* #define FT_CONFIG_OPTIONS_H */ - /* #include */ - /* */ - /* will use "$BUILD/myftoptions.h" instead of this file for macro */ - /* definitions. */ - /* */ - /* Note also that you can similarly pre-define the macro */ - /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ - /* that are statically linked to the library at compile time. By */ - /* default, this file is . */ - /* */ - /* We highly recommend using the third method whenever possible. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* Many compilers provide a non-ANSI 64-bit data type that can be used */ - /* by FreeType to speed up some computations. However, this will create */ - /* some problems when compiling the library in strict ANSI mode. */ - /* */ - /* For this reason, the use of 64-bit integers is normally disabled when */ - /* the __STDC__ macro is defined. You can however disable this by */ - /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */ - /* */ - /* For most compilers, this will only create compilation warnings when */ - /* building the library. */ - /* */ - /* ObNote: The compiler-specific 64-bit integers are detected in the */ - /* file "ftconfig.h" either statically or through the */ - /* `configure' script on supported platforms. */ - /* */ -#undef FT_CONFIG_OPTION_FORCE_INT64 - - - /*************************************************************************/ - /* */ - /* Gzip-compressed file support. */ - /* */ - /* FreeType now handles font files that have been compressed with the */ - /* 'gzip' program. This is mostly used to parse many of the PCF files */ - /* that come with XFree86. The implementation uses `zlib' to */ - /* partially uncompress the file on the fly (see src/base/ftgzip.c). */ - /* */ - /* Define this macro if you want to enable this "feature". Note that */ - /* this will however force you to link the zlib to any program that */ - /* also uses FreeType. */ - /* */ -#define FT_CONFIG_OPTION_USE_ZLIB - - - /*************************************************************************/ - /* */ - /* ZLib library selection */ - /* */ - /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */ - /* It allows FreeType's "ftgzip" component to link to the system's */ - /* installation of the ZLib library. This is useful on systems like */ - /* Unix or VMS where it generally is already available. */ - /* */ - /* If you let it undefined, the component will use its own copy */ - /* of the zlib sources instead. These have been modified to be */ - /* included directly within the component and *not* export external */ - /* function names. This allows you to link any program with FreeType */ - /* _and_ ZLib without linking conflicts. */ - /* */ - /* Do not #undef this macro here since the build system might define */ - /* it for certain configurations only. */ - /* */ -/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ - - - /*************************************************************************/ - /* */ - /* DLL export compilation */ - /* */ - /* When compiling FreeType as a DLL, some systems/compilers need a */ - /* special keyword in front OR after the return type of function */ - /* declarations. */ - /* */ - /* Two macros are used within the FreeType source code to define */ - /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ - /* */ - /* FT_EXPORT( return_type ) */ - /* */ - /* is used in a function declaration, as in */ - /* */ - /* FT_EXPORT( FT_Error ) */ - /* FT_Init_FreeType( FT_Library* alibrary ); */ - /* */ - /* */ - /* FT_EXPORT_DEF( return_type ) */ - /* */ - /* is used in a function definition, as in */ - /* */ - /* FT_EXPORT_DEF( FT_Error ) */ - /* FT_Init_FreeType( FT_Library* alibrary ) */ - /* { */ - /* ... some code ... */ - /* return FT_Err_Ok; */ - /* } */ - /* */ - /* You can provide your own implementation of FT_EXPORT and */ - /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ - /* will be later automatically defined as `extern return_type' to */ - /* allow normal compilation. */ - /* */ - /* Do not #undef these macros here since the build system might define */ - /* them for certain configurations only. */ - /* */ -/* #define FT_EXPORT(x) extern x */ -/* #define FT_EXPORT_DEF(x) x */ - - - /*************************************************************************/ - /* */ - /* Glyph Postscript Names handling */ - /* */ - /* By default, FreeType 2 is compiled with the `PSNames' module. This */ - /* module is in charge of converting a glyph name string into a */ - /* Unicode value, or return a Macintosh standard glyph name for the */ - /* use with the TrueType `post' table. */ - /* */ - /* Undefine this macro if you do not want `PSNames' compiled in your */ - /* build of FreeType. This has the following effects: */ - /* */ - /* - The TrueType driver will provide its own set of glyph names, */ - /* if you build it to support postscript names in the TrueType */ - /* `post' table. */ - /* */ - /* - The Type 1 driver will not be able to synthetize a Unicode */ - /* charmap out of the glyphs found in the fonts. */ - /* */ - /* You would normally undefine this configuration macro when building */ - /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ - /* */ -#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES - - - /*************************************************************************/ - /* */ - /* Postscript Names to Unicode Values support */ - /* */ - /* By default, FreeType 2 is built with the `PSNames' module compiled */ - /* in. Among other things, the module is used to convert a glyph name */ - /* into a Unicode value. This is especially useful in order to */ - /* synthetize on the fly a Unicode charmap from the CFF/Type 1 driver */ - /* through a big table named the `Adobe Glyph List' (AGL). */ - /* */ - /* Undefine this macro if you do not want the Adobe Glyph List */ - /* compiled in your `PSNames' module. The Type 1 driver will not be */ - /* able to synthetize a Unicode charmap out of the glyphs found in the */ - /* fonts. */ - /* */ -#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST - - - /*************************************************************************/ - /* */ - /* Support for Mac fonts */ - /* */ - /* Define this macro if you want support for outline fonts in Mac */ - /* format (mac dfont, mac resource, macbinary containing a mac */ - /* resource) on non-Mac platforms. */ - /* */ - /* Note that the `FOND' resource isn't checked. */ - /* */ -#define FT_CONFIG_OPTION_MAC_FONTS - - - /*************************************************************************/ - /* */ - /* Allow the use of FT_Incremental_Interface to load typefaces that */ - /* contain no glyph data, but supply it via a callback function. */ - /* This allows FreeType to be used with the PostScript language, using */ - /* the GhostScript interpreter. */ - /* */ -/* #define FT_CONFIG_OPTION_INCREMENTAL */ - - - /*************************************************************************/ - /* */ - /* The size in bytes of the render pool used by the scan-line converter */ - /* to do all of its work. */ - /* */ - /* This must be greater than 4KByte. */ - /* */ -#define FT_RENDER_POOL_SIZE 16384L - - - /*************************************************************************/ - /* */ - /* FT_MAX_MODULES */ - /* */ - /* The maximum number of modules that can be registered in a single */ - /* FreeType library object. 32 is the default. */ - /* */ -#define FT_MAX_MODULES 32 - - - /*************************************************************************/ - /* */ - /* Debug level */ - /* */ - /* FreeType can be compiled in debug or trace mode. In debug mode, */ - /* errors are reported through the `ftdebug' component. In trace */ - /* mode, additional messages are sent to the standard output during */ - /* execution. */ - /* */ - /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ - /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ - /* */ - /* Don't define any of these macros to compile in `release' mode! */ - /* */ - /* Do not #undef these macros here since the build system might define */ - /* them for certain configurations only. */ - /* */ -/* #define FT_DEBUG_LEVEL_ERROR */ -/* #define FT_DEBUG_LEVEL_TRACE */ - - - /*************************************************************************/ - /* */ - /* Memory Debugging */ - /* */ - /* FreeType now comes with an integrated memory debugger that is */ - /* capable of detecting simple errors like memory leaks or double */ - /* deletes. To compile it within your build of the library, you */ - /* should define FT_DEBUG_MEMORY here. */ - /* */ - /* Note that the memory debugger is only activated at runtime when */ - /* when the _environment_ variable "FT2_DEBUG_MEMORY" is defined also! */ - /* */ - /* Do not #undef this macro here since the build system might define */ - /* it for certain configurations only. */ - /* */ -/* #define FT_DEBUG_MEMORY */ - - - /*************************************************************************/ - /* */ - /* Module errors */ - /* */ - /* If this macro is set (which is _not_ the default), the higher byte */ - /* of an error code gives the module in which the error has occurred, */ - /* while the lower byte is the real error code. */ - /* */ - /* Setting this macro makes sense for debugging purposes only, since */ - /* it would break source compatibility of certain programs that use */ - /* FreeType 2. */ - /* */ - /* More details can be found in the files ftmoderr.h and fterrors.h. */ - /* */ -#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS - - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ - /* embedded bitmaps in all formats using the SFNT module (namely */ - /* TrueType & OpenType). */ - /* */ -#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ - /* load and enumerate the glyph Postscript names in a TrueType or */ - /* OpenType file. */ - /* */ - /* Note that when you do not compile the `PSNames' module by undefining */ - /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ - /* contain additional code used to read the PS Names table from a font. */ - /* */ - /* (By default, the module uses `PSNames' to extract glyph names.) */ - /* */ -#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ - /* access the internal name table in a SFNT-based format like TrueType */ - /* or OpenType. The name table contains various strings used to */ - /* describe the font, like family name, copyright, version, etc. It */ - /* does not contain any glyph name though. */ - /* */ - /* Accessing SFNT names is done through the functions declared in */ - /* `freetype/ftnames.h'. */ - /* */ -#define TT_CONFIG_OPTION_SFNT_NAMES - - - /*************************************************************************/ - /* */ - /* TrueType CMap support */ - /* */ - /* Here you can fine-tune which TrueType CMap table format shall be */ - /* supported. */ -#define TT_CONFIG_CMAP_FORMAT_0 -#define TT_CONFIG_CMAP_FORMAT_2 -#define TT_CONFIG_CMAP_FORMAT_4 -#define TT_CONFIG_CMAP_FORMAT_6 -#define TT_CONFIG_CMAP_FORMAT_8 -#define TT_CONFIG_CMAP_FORMAT_10 -#define TT_CONFIG_CMAP_FORMAT_12 - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ - /* a bytecode interpreter in the TrueType driver. Note that there are */ - /* important patent issues related to the use of the interpreter. */ - /* */ - /* By undefining this, you will only compile the code necessary to load */ - /* TrueType glyphs without hinting. */ - /* */ - /* Do not #undef this macro here, since the build system might */ - /* define it for certain configurations only. */ - /* */ -/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */ - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_UNPATENTED_HINTING (in addition to */ - /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER) to compile the unpatented */ - /* work-around hinting system. Note that for the moment, the algorithm */ - /* is only used when selected at runtime through the parameter tag */ - /* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook */ - /* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally actived */ - /* */ -#define TT_CONFIG_OPTION_UNPATENTED_HINTING - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ - /* bytecode interpreter with a huge switch statement, rather than a call */ - /* table. This results in smaller and faster code for a number of */ - /* architectures. */ - /* */ - /* Note however that on some compiler/processor combinations, undefining */ - /* this macro will generate faster, though larger, code. */ - /* */ -#define TT_CONFIG_OPTION_INTERPRETER_SWITCH - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ - /* TrueType glyph loader to use Apple's definition of how to handle */ - /* component offsets in composite glyphs. */ - /* */ - /* Apple and MS disagree on the default behavior of component offsets */ - /* in composites. Apple says that they should be scaled by the scale */ - /* factors in the transformation matrix (roughly, it's more complex) */ - /* while MS says they should not. OpenType defines two bits in the */ - /* composite flags array which can be used to disambiguate, but old */ - /* fonts will not have them. */ - /* */ - /* http://partners.adobe.com/asn/developer/opentype/glyf.html */ - /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ - /* */ -#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */ - /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ - /* required. */ - /* */ -#define T1_MAX_DICT_DEPTH 5 - - - /*************************************************************************/ - /* */ - /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ - /* calls during glyph loading. */ - /* */ -#define T1_MAX_SUBRS_CALLS 16 - - - /*************************************************************************/ - /* */ - /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ - /* minimum of 16 is required. */ - /* */ - /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ - /* */ -#define T1_MAX_CHARSTRINGS_OPERANDS 256 - - - /*************************************************************************/ - /* */ - /* Define this configuration macro if you want to prevent the */ - /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ - /* files into an existing face. Note that if set, the T1 driver will be */ - /* unable to produce kerning distances. */ - /* */ -#undef T1_CONFIG_OPTION_NO_AFM - - - /*************************************************************************/ - /* */ - /* Define this configuration macro if you want to prevent the */ - /* compilation of the Multiple Masters font support in the Type 1 */ - /* driver. */ - /* */ -#undef T1_CONFIG_OPTION_NO_MM_SUPPORT - - /* */ - -/* - * The FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent - * improvements to the auto-hinter contributed by David Chester. They will - * most likely disappear completely in the next release. For now, you - * should always keep them defined. - * - */ -#define FT_CONFIG_OPTION_CHESTER_HINTS - -#ifdef FT_CONFIG_OPTION_CHESTER_HINTS - -#define FT_CONFIG_CHESTER_SMALL_F -#define FT_CONFIG_CHESTER_ASCENDER -#define FT_CONFIG_CHESTER_SERIF -#define FT_CONFIG_CHESTER_STEM -#define FT_CONFIG_CHESTER_BLUE_SCALE + /*************************************************************************/ + /* */ + /* USER-SELECTABLE CONFIGURATION MACROS */ + /* */ + /* This file contains the default configuration macro definitions for */ + /* a standard build of the FreeType library. There are three ways to */ + /* use this file to build project-specific versions of the library: */ + /* */ + /* - You can modify this file by hand, but this is not recommended in */ + /* cases where you would like to build several versions of the */ + /* library from a single source directory. */ + /* */ + /* - You can put a copy of this file in your build directory, more */ + /* precisely in "$BUILD/freetype/config/ftoption.h", where "$BUILD" */ + /* is the name of a directory that is included _before_ the FreeType */ + /* include path during compilation. */ + /* */ + /* The default FreeType Makefiles and Jamfiles use the build */ + /* directory "builds/" by default, but you can easily change */ + /* that for your own projects. */ + /* */ + /* - Copy the file to "$BUILD/ft2build.h" and modify it */ + /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ + /* locate this file during the build. For example, */ + /* */ + /* #define FT_CONFIG_OPTIONS_H */ + /* #include */ + /* */ + /* will use "$BUILD/myftoptions.h" instead of this file for macro */ + /* definitions. */ + /* */ + /* Note also that you can similarly pre-define the macro */ + /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ + /* that are statically linked to the library at compile time. By */ + /* default, this file is . */ + /* */ + /* We highly recommend using the third method whenever possible. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Many compilers provide a non-ANSI 64-bit data type that can be used */ + /* by FreeType to speed up some computations. However, this will create */ + /* some problems when compiling the library in strict ANSI mode. */ + /* */ + /* For this reason, the use of 64-bit integers is normally disabled when */ + /* the __STDC__ macro is defined. You can however disable this by */ + /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */ + /* */ + /* For most compilers, this will only create compilation warnings when */ + /* building the library. */ + /* */ + /* ObNote: The compiler-specific 64-bit integers are detected in the */ + /* file "ftconfig.h" either statically or through the */ + /* `configure' script on supported platforms. */ + /* */ + #undef FT_CONFIG_OPTION_FORCE_INT64 + + + /*************************************************************************/ + /* */ + /* Gzip-compressed file support. */ + /* */ + /* FreeType now handles font files that have been compressed with the */ + /* 'gzip' program. This is mostly used to parse many of the PCF files */ + /* that come with XFree86. The implementation uses `zlib' to */ + /* partially uncompress the file on the fly (see src/base/ftgzip.c). */ + /* */ + /* Define this macro if you want to enable this "feature". Note that */ + /* this will however force you to link the zlib to any program that */ + /* also uses FreeType. */ + /* */ + #define FT_CONFIG_OPTION_USE_ZLIB + + + /*************************************************************************/ + /* */ + /* ZLib library selection */ + /* */ + /* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */ + /* It allows FreeType's "ftgzip" component to link to the system's */ + /* installation of the ZLib library. This is useful on systems like */ + /* Unix or VMS where it generally is already available. */ + /* */ + /* If you let it undefined, the component will use its own copy */ + /* of the zlib sources instead. These have been modified to be */ + /* included directly within the component and *not* export external */ + /* function names. This allows you to link any program with FreeType */ + /* _and_ ZLib without linking conflicts. */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ + /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ + + + /*************************************************************************/ + /* */ + /* DLL export compilation */ + /* */ + /* When compiling FreeType as a DLL, some systems/compilers need a */ + /* special keyword in front OR after the return type of function */ + /* declarations. */ + /* */ + /* Two macros are used within the FreeType source code to define */ + /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ + /* */ + /* FT_EXPORT( return_type ) */ + /* */ + /* is used in a function declaration, as in */ + /* */ + /* FT_EXPORT( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ); */ + /* */ + /* */ + /* FT_EXPORT_DEF( return_type ) */ + /* */ + /* is used in a function definition, as in */ + /* */ + /* FT_EXPORT_DEF( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ) */ + /* { */ + /* ... some code ... */ + /* return FT_Err_Ok; */ + /* } */ + /* */ + /* You can provide your own implementation of FT_EXPORT and */ + /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ + /* will be later automatically defined as `extern return_type' to */ + /* allow normal compilation. */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ + /* #define FT_EXPORT(x) extern x */ + /* #define FT_EXPORT_DEF(x) x */ + + + /*************************************************************************/ + /* */ + /* Glyph Postscript Names handling */ + /* */ + /* By default, FreeType 2 is compiled with the `PSNames' module. This */ + /* module is in charge of converting a glyph name string into a */ + /* Unicode value, or return a Macintosh standard glyph name for the */ + /* use with the TrueType `post' table. */ + /* */ + /* Undefine this macro if you do not want `PSNames' compiled in your */ + /* build of FreeType. This has the following effects: */ + /* */ + /* - The TrueType driver will provide its own set of glyph names, */ + /* if you build it to support postscript names in the TrueType */ + /* `post' table. */ + /* */ + /* - The Type 1 driver will not be able to synthetize a Unicode */ + /* charmap out of the glyphs found in the fonts. */ + /* */ + /* You would normally undefine this configuration macro when building */ + /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ + /* */ + #define FT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Postscript Names to Unicode Values support */ + /* */ + /* By default, FreeType 2 is built with the `PSNames' module compiled */ + /* in. Among other things, the module is used to convert a glyph name */ + /* into a Unicode value. This is especially useful in order to */ + /* synthetize on the fly a Unicode charmap from the CFF/Type 1 driver */ + /* through a big table named the `Adobe Glyph List' (AGL). */ + /* */ + /* Undefine this macro if you do not want the Adobe Glyph List */ + /* compiled in your `PSNames' module. The Type 1 driver will not be */ + /* able to synthetize a Unicode charmap out of the glyphs found in the */ + /* fonts. */ + /* */ + #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST + + + /*************************************************************************/ + /* */ + /* Support for Mac fonts */ + /* */ + /* Define this macro if you want support for outline fonts in Mac */ + /* format (mac dfont, mac resource, macbinary containing a mac */ + /* resource) on non-Mac platforms. */ + /* */ + /* Note that the `FOND' resource isn't checked. */ + /* */ + #define FT_CONFIG_OPTION_MAC_FONTS + + + /*************************************************************************/ + /* */ + /* Allow the use of FT_Incremental_Interface to load typefaces that */ + /* contain no glyph data, but supply it via a callback function. */ + /* This allows FreeType to be used with the PostScript language, using */ + /* the GhostScript interpreter. */ + /* */ + /* #define FT_CONFIG_OPTION_INCREMENTAL */ + + + /*************************************************************************/ + /* */ + /* The size in bytes of the render pool used by the scan-line converter */ + /* to do all of its work. */ + /* */ + /* This must be greater than 4KByte. */ + /* */ + #define FT_RENDER_POOL_SIZE 16384L + + + /*************************************************************************/ + /* */ + /* FT_MAX_MODULES */ + /* */ + /* The maximum number of modules that can be registered in a single */ + /* FreeType library object. 32 is the default. */ + /* */ + #define FT_MAX_MODULES 32 + + + /*************************************************************************/ + /* */ + /* Debug level */ + /* */ + /* FreeType can be compiled in debug or trace mode. In debug mode, */ + /* errors are reported through the `ftdebug' component. In trace */ + /* mode, additional messages are sent to the standard output during */ + /* execution. */ + /* */ + /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ + /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ + /* */ + /* Don't define any of these macros to compile in `release' mode! */ + /* */ + /* Do not #undef these macros here since the build system might define */ + /* them for certain configurations only. */ + /* */ + /* #define FT_DEBUG_LEVEL_ERROR */ + /* #define FT_DEBUG_LEVEL_TRACE */ + + + /*************************************************************************/ + /* */ + /* Memory Debugging */ + /* */ + /* FreeType now comes with an integrated memory debugger that is */ + /* capable of detecting simple errors like memory leaks or double */ + /* deletes. To compile it within your build of the library, you */ + /* should define FT_DEBUG_MEMORY here. */ + /* */ + /* Note that the memory debugger is only activated at runtime when */ + /* when the _environment_ variable "FT2_DEBUG_MEMORY" is defined also! */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ + /* #define FT_DEBUG_MEMORY */ + + + /*************************************************************************/ + /* */ + /* Module errors */ + /* */ + /* If this macro is set (which is _not_ the default), the higher byte */ + /* of an error code gives the module in which the error has occurred, */ + /* while the lower byte is the real error code. */ + /* */ + /* Setting this macro makes sense for debugging purposes only, since */ + /* it would break source compatibility of certain programs that use */ + /* FreeType 2. */ + /* */ + /* More details can be found in the files ftmoderr.h and fterrors.h. */ + /* */ + #undef FT_CONFIG_OPTION_USE_MODULE_ERRORS + + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ + /* embedded bitmaps in all formats using the SFNT module (namely */ + /* TrueType & OpenType). */ + /* */ + #define TT_CONFIG_OPTION_EMBEDDED_BITMAPS + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ + /* load and enumerate the glyph Postscript names in a TrueType or */ + /* OpenType file. */ + /* */ + /* Note that when you do not compile the `PSNames' module by undefining */ + /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ + /* contain additional code used to read the PS Names table from a font. */ + /* */ + /* (By default, the module uses `PSNames' to extract glyph names.) */ + /* */ + #define TT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ + /* access the internal name table in a SFNT-based format like TrueType */ + /* or OpenType. The name table contains various strings used to */ + /* describe the font, like family name, copyright, version, etc. It */ + /* does not contain any glyph name though. */ + /* */ + /* Accessing SFNT names is done through the functions declared in */ + /* `freetype/ftnames.h'. */ + /* */ + #define TT_CONFIG_OPTION_SFNT_NAMES + + + /*************************************************************************/ + /* */ + /* TrueType CMap support */ + /* */ + /* Here you can fine-tune which TrueType CMap table format shall be */ + /* supported. */ + #define TT_CONFIG_CMAP_FORMAT_0 + #define TT_CONFIG_CMAP_FORMAT_2 + #define TT_CONFIG_CMAP_FORMAT_4 + #define TT_CONFIG_CMAP_FORMAT_6 + #define TT_CONFIG_CMAP_FORMAT_8 + #define TT_CONFIG_CMAP_FORMAT_10 + #define TT_CONFIG_CMAP_FORMAT_12 + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ + /* a bytecode interpreter in the TrueType driver. Note that there are */ + /* important patent issues related to the use of the interpreter. */ + /* */ + /* By undefining this, you will only compile the code necessary to load */ + /* TrueType glyphs without hinting. */ + /* */ + /* Do not #undef this macro here, since the build system might */ + /* define it for certain configurations only. */ + /* */ + #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_UNPATENTED_HINTING (in addition to */ + /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER) to compile the unpatented */ + /* work-around hinting system. Note that for the moment, the algorithm */ + /* is only used when selected at runtime through the parameter tag */ + /* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook */ + /* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally actived */ + /* */ + #define TT_CONFIG_OPTION_UNPATENTED_HINTING + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */ + /* bytecode interpreter with a huge switch statement, rather than a call */ + /* table. This results in smaller and faster code for a number of */ + /* architectures. */ + /* */ + /* Note however that on some compiler/processor combinations, undefining */ + /* this macro will generate faster, though larger, code. */ + /* */ + #define TT_CONFIG_OPTION_INTERPRETER_SWITCH + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ + /* TrueType glyph loader to use Apple's definition of how to handle */ + /* component offsets in composite glyphs. */ + /* */ + /* Apple and MS disagree on the default behavior of component offsets */ + /* in composites. Apple says that they should be scaled by the scale */ + /* factors in the transformation matrix (roughly, it's more complex) */ + /* while MS says they should not. OpenType defines two bits in the */ + /* composite flags array which can be used to disambiguate, but old */ + /* fonts will not have them. */ + /* */ + /* http://partners.adobe.com/asn/developer/opentype/glyf.html */ + /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ + /* */ + #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */ + /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ + /* required. */ + /* */ + #define T1_MAX_DICT_DEPTH 5 + + + /*************************************************************************/ + /* */ + /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ + /* calls during glyph loading. */ + /* */ + #define T1_MAX_SUBRS_CALLS 16 + + + /*************************************************************************/ + /* */ + /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ + /* minimum of 16 is required. */ + /* */ + /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ + /* */ + #define T1_MAX_CHARSTRINGS_OPERANDS 256 + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ + /* files into an existing face. Note that if set, the T1 driver will be */ + /* unable to produce kerning distances. */ + /* */ + #undef T1_CONFIG_OPTION_NO_AFM + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of the Multiple Masters font support in the Type 1 */ + /* driver. */ + /* */ + #undef T1_CONFIG_OPTION_NO_MM_SUPPORT + + /* */ + + /* + * The FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent + * improvements to the auto-hinter contributed by David Chester. They will + * most likely disappear completely in the next release. For now, you + * should always keep them defined. + * + */ + #define FT_CONFIG_OPTION_CHESTER_HINTS + + #ifdef FT_CONFIG_OPTION_CHESTER_HINTS + + #define FT_CONFIG_CHESTER_SMALL_F + #define FT_CONFIG_CHESTER_ASCENDER + #define FT_CONFIG_CHESTER_SERIF + #define FT_CONFIG_CHESTER_STEM + #define FT_CONFIG_CHESTER_BLUE_SCALE -#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */ + #endif /* FT_CONFIG_OPTION_CHESTER_HINTS */ FT_END_HEADER