From miguelinho at speedy.com.pe Sun Oct 2 13:35:36 2005 From: miguelinho at speedy.com.pe (=?ISO-8859-1?B?TWlndWVsIETtYXo=?=) Date: Sun Oct 2 13:50:35 2005 Subject: [Xprint] HTML to PostScript Message-ID: <1128274536.43401a68ccf09@correo.speedy.com.pe> Hi guys, Would like to know if Xprint can somehow help me to do this.. Need to convert an available server-side web page to a PostScript file, including images, css, tables, etc, I've tried html2ps and the resulting quality is not good enough, The easiest way to do this is by clicking the print option on the menu file of any browser, but I need to automate this process with some command I can type on a shell. please, give me some suggestions, ideas, pointers, or anything you have... Regards, Miguel From toby at inf.ed.ac.uk Thu Oct 6 11:49:56 2005 From: toby at inf.ed.ac.uk (Toby Blake) Date: Thu Oct 6 05:50:36 2005 Subject: [Xprint] Xprint postscript gives invalidfont: glyphshow errors Message-ID: Hi all, In a previous message to the list, I said the following: > Lately, I've been seeing numerous postscript errors when printing > from Xprint to HP printers - as a result of the postscript produced > by Xprint. I haven't posted any of these details to the list, as it > didn't appear to be active enough to warrant the effort. It looks very likely that we're going to have to stop using xprint because of these errors and other problems (Augment_Printer_List not working at all, which I've posted about several times). Sadly all of this has led us to the inevitable conclusion that xprint simply isn't ready for production usage yet - it's too buggy, there seems to be no effort to fix these bugs and the almost complete lack of activity on this list doesn't fill me with confidence that there's much in the way of ongoing development. I'd love to be proved wrong however, as it's potentially a very useful piece of software, *if it works*. Anyway, I've been doing a bit of investigation into the postscript errors I mention above, so thought I would share my findings with the list. The postscript errors we see are: Error: invalidfont; OffendingCommand: glyphshow Almost all of my testing of this has been printing from Firefox 1.0.6 on Fedora Core 3. Curiously this problem only seemed to affect some users - the same page would print fine for one user, but fail for another, but for those affected, the problem was fairly widespread - even reproducable on printing plain text files from Thunderbird. I initially suspected that it might be a problem with the emulated postscript in HP printers, which we have 60+ of here, but the same error was reported by a Xerox Phaser 4400, which uses proper adobe postscript. By printing the postscript to a file, I could directly compare the working PS code with the non-working PS code. I'll include some of the result of a diff between the working code and the non-working code below, with my observations interspersed (note that I'm in no way a postscript expert)... [kant]toby: diff WORKING-firefox.output.ps BROKEN-firefox.output.ps|head -24 76,77c76,77 < %%BeginFont: Utopia-Regular_iso8859-1 < %!PS-AdobeFont-1.0: Utopia-Regular_iso8859-1 --- > %%BeginFont: Utopia-Regular_iso10646-1 > %!PS-AdobeFont-1.0: Utopia-Regular_iso10646-1 90c90 < /FontName /Utopia-Regular_iso8859-1 def --- > /FontName /Utopia-Regular_iso10646-1 def ## OK, so the initial difference is that they're specifying different ## font names, although the actual font would appear to be the same ## (as everything else up to %%EndFont is identical) 1107d1106 < /Utopia-Regular_iso8859-1 83 f Tf 1109c1108,1116 < [ /S /e /r /v /i /c /e /s /space /G /r /o /u /p /space /M /e /e /t /i /n /g /space /M /i /n /u /t /e /s /space /two /zero /zero /five /hyphen /zero /eight /hyphen /zero /two ]{glyphshow}fa gr gs --- > /S glyphshow > /e glyphshow > /r glyphshow > /v glyphshow > /i glyphshow > /c glyphshow > /e glyphshow > /s glyphshow > gr gs ## This appears to me to be where the problem is. In the working ## example, we see '/Utopia-Regular_iso8859-1 83 f Tf', which I ## assume is specifying the font name to use for the ensuing text. ## Yet, in the broken code this line doesn't appear, so I suspect the ## /S glyphshow line is producing the error, as it doesn't have a font ## specified. As I say though, I'm no postscript expert, so I could ## be wrong here. Next I looked into what was causing the broken postscript to be generated - specifically why would the same page print perfectly for one user, but fail for another, whan all other parameters were the same (browser, machine, printer)? What I concluded seems very bizarre... Starting with a completely vanilla firefox profile (having moved the ~/.mozilla directory out of the way), everything printed fine. However, if I then go to Edit->Preferences, General, Fonts and Colors and change one of the font settings here - this leads to the faulty postcript being produced, which makes absolutely no sense to me. For instance, if I make an extremely trivial change, such as changing the monospace font size from the default (12) to 14, this is enough to make Firefox/Xprint produce the faulty postscript. Note that if I change the setting back to 12 again, it *still* produces dodgy postscript, but if I quit firefox, edit prefs.js to remove the lines it added when I changed the font size from 12 to 14 (which are... user_pref("font.name.monospace.x-western", "monospace"); user_pref("font.name.sans-serif.x-western", "sans-serif"); user_pref("font.name.serif.x-western", "serif"); user_pref("font.size.fixed.x-western", 14); ) and then start firefox - it prints OK. I must say I don't understand this at all - why would a trivial preferences setting change in Firefox lead to completely different postscript being produced and particularly when the postscript differences seem to be unrelated to the preference that was changed - the only connection I can see is that they're both related to fonts, in general. Very very odd, but hopefully someone from the xprint development team will find this information useful. Regards Toby Blake School of Informatics University of Edinburgh From toby at inf.ed.ac.uk Thu Oct 6 14:27:57 2005 From: toby at inf.ed.ac.uk (Toby Blake) Date: Thu Oct 6 08:28:30 2005 Subject: [Xprint] user-level documentation In-Reply-To: <4339743F.90403@my.home> References: <43384A56.1030507@my.home> <4339743F.90403@my.home> Message-ID: > At least you seem to know /something/ about the inner workings of > xprint. This knowledge may be invaluable for constructing the > user-level doc that we need. Sure, I'd be willing to contribute, but it looks like we're not going to be using xprint anymore (see my last post for details), so I'm not sure I'd be able to contribute much. > Do you (or does anyone) happen to know why xprint exists at all? Hmmm, I'm probably not the best person to comment, but I like the principle behind the idea - that X programs can use the same printing interface - i.e. the list of printers is the same for each app, thus it provides a standard way of interacting with the underlying print system. Cheers Toby From dparsons at debian.org Fri Oct 7 00:15:35 2005 From: dparsons at debian.org (Drew Parsons) Date: Thu Oct 6 09:16:28 2005 Subject: [Xprint] Xprint postscript gives invalidfont: glyphshow errors In-Reply-To: References: Message-ID: <1128604535.8218.22.camel@pug.anu.edu.au> On Thu, 2005-10-06 at 10:49 +0100, Toby Blake wrote: > [kant]toby: diff WORKING-firefox.output.ps BROKEN-firefox.output.ps|head -24 > 90c90 > < /FontName /Utopia-Regular_iso8859-1 def > --- > > /FontName /Utopia-Regular_iso10646-1 def > Interesting. This could be important: it looks from this that the heart of the problem is in the font encoding. For some reason a unicode (UTF-8, or iso10646-1) environment is causing the problems. Postscript is older than unicode, there may be some problem adapting. I'm no Postscript expert either so I can't speak knowledgably. You could try printing a chart or two from http://www.unicode.org/charts/ and check it's OK. Although those charts are PDF not Postscript, not quite the same thing. It would be helpful to get a sample postscript file containing unicode glyphs from somewhere. If this is the right line of reasoning, then I think the options are: 1) Postscript has not been arranged to handle iso10646-1 adequately. Seems unlikely but. I've had 2) The font /Utopia-Regular_iso10646-1 itself is broken. Not likely, you're only using the latin1 section of it anyway. 3) Printers are old and can't handle postscript containing iso10646-1. Probably not the case since you'll be able to print to file and see the same problem using gv, correct? 4) Xprint is screwing up the way it handles font encoding. Curious, because the whole attraction of Xprint for me is that it can handle multiple foreign languages at once (the same problem that unicode solves at the encoding level). Xprint's doing something right, but as you've noticed there's still more work to do. > > Starting with a completely vanilla firefox profile (having moved the > ~/.mozilla directory out of the way), everything printed fine. > However, if I then go to Edit->Preferences, General, Fonts and Colors > and change one of the font settings here - this leads to the faulty > postcript being produced, which makes absolutely no sense to me. For > instance, if I make an extremely trivial change, such as changing the > monospace font size from the default (12) to 14, this is enough to > make Firefox/Xprint produce the faulty postscript. Note that if I > change the setting back to 12 again, it *still* produces dodgy > postscript, but if I quit firefox, edit prefs.js to remove the lines > it added when I changed the font size from 12 to 14 (which are... Ah yes, we noticed this on Debian too. I'm "glad" it's not just us... you're seeing the same problem on Redhat. One would think from this behaviour that the bug is in Firefox, not Xprint. It's a complex problem *sigh* I don't think you described what exactly your printing problem was. What appeared on paper when the bad postscript went through? Drew From toby at inf.ed.ac.uk Thu Oct 6 15:25:23 2005 From: toby at inf.ed.ac.uk (Toby Blake) Date: Thu Oct 6 09:26:15 2005 Subject: [Xprint] Xprint postscript gives invalidfont: glyphshow errors In-Reply-To: <1128604535.8218.22.camel@pug.anu.edu.au> References: <1128604535.8218.22.camel@pug.anu.edu.au> Message-ID: Bit rushed for time just now, but just to reply quickly to this bit: > I don't think you described what exactly your printing problem > was. What appeared on paper when the bad postscript went through? Nothing at all - the printer throws out the job (both HP and Xerox printers). Although it's worth mentioning the HP8150DN which crashes when sent this postscript with a 79.00FE error - requiring it to be power-cycled. Cheers Toby From Michel.Correge at cert.fr Tue Oct 11 11:54:53 2005 From: Michel.Correge at cert.fr (Michel Correge) Date: Tue Oct 11 04:55:29 2005 Subject: [Xprint] Xprt stops without any error Message-ID: <200510110854.j9B8srY10105@epimetes.cert.fr> Hi, I have installed Xprt release 9.1 on a Solaris 8 platform. Xprt is launched at boot time using the /etc/init.d/xprint script. From time to time, Xprt stops without recording any error status in its log file. Any idea of the reason ? Thanks Michel Correge From julien.lafon at gmail.com Wed Oct 26 15:17:34 2005 From: julien.lafon at gmail.com (Julien Lafon) Date: Wed Oct 26 08:18:09 2005 Subject: [Xprint] Re: autotooling Xprint In-Reply-To: <1122801056.6300.14.camel@pug.anu.edu.au> References: <1122801056.6300.14.camel@pug.anu.edu.au> Message-ID: On 7/31/05, Drew Parsons wrote: > I've had a go at making the changes to xserver/xorg required to build > Xprt, creating new Makefile.am scripts in the Xprint subdirectory. Xprt > doesn't use various Xserver features like xkb, xi, xinput, so I added a > few more disable flags into xorg/configure.ac. A neater solution might > be to have these switched off automatically when --enable-xprint is > switched on. > > I've got it to the point where the Xprt binary is built. I must have > missed some -Ddefines, since the binary doesn't operate correctly, > saying "Fatal server error: no screens found", instead of waiting > quietly for print connections. Possibly that means I didn't give it the > path to the Xprint config file > (e.g. /usr/share/Xprint/xserver/C/print/Xprinters). The -XpFile command > line option for providing it seems to have been taken away. > > Do you want to take what I've got? You could add what I missed, giving > the right build flags. If it is just the config file I missed, that > shouldn't be too hard for me to track down myself. Drew: Did you solved the problem yet? I think this may be our fault as we introduced a new preprocessor symbol a while ago for the unified print server... Julien -- Julien Lafon Senior Staff Engineer, Hitachi From julien.lafon at gmail.com Wed Oct 26 16:18:21 2005 From: julien.lafon at gmail.com (Julien Lafon) Date: Wed Oct 26 14:06:23 2005 Subject: [Xprint] Xprt stops without any error In-Reply-To: <200510110854.j9B8srY10105@epimetes.cert.fr> References: <200510110854.j9B8srY10105@epimetes.cert.fr> Message-ID: On 10/11/05, Michel Correge wrote: > Hi, > I have installed Xprt release 9.1 on a Solaris 8 platform. > Xprt is launched at boot time using the /etc/init.d/xprint script. > From time to time, Xprt stops without recording any error status in its > log file. > > Any idea of the reason ? Does /usr/bin/ps still list the Xprt process? Julien -- Julien Lafon Senior Staff Engineer, Hitachi From dparsons at debian.org Thu Oct 27 11:45:05 2005 From: dparsons at debian.org (Drew Parsons) Date: Wed Oct 26 20:45:42 2005 Subject: [Xprint] Re: Bug#317149: Please change output directory back to $HOME/cups-pdf/ In-Reply-To: References: <20050706162257.GA2416@keitarou.bubblesworth.net> Message-ID: <1130373905.17514.3.camel@pug.anu.edu.au> On Wed, 2005-07-06 at 20:59 +0300, Martin-Eric Racine wrote: > > > > I'd just like to say I think the old default of $HOME/cups-pdf/ is > > better than $HOME/ because it means the output goes somewhere expected > > and _isolated_ from your other files. This is especially helpful when > > Windows is sending printjobs through with all kinds of unexpected > > filenames, and it's therefore much more unlikely to accidentally > > overwrite an unrelated file. > > > The advantage is that documents get sent straight to a familiar folder, > instead of a fuzzy-named cups-pdf; users won't necessarily associate the > name of the back-end with the ability to print documents out or to the > similarily-named subdirectory sitting in their home-directory. > > In fairness, I think that CUPS-PDF and Xprint (or any PDF backend) should > output to a common directory, which could be e.g. ~/Printouts or something > similar. Then again, this would require teaching users where to find the > PDF documentss which, by definition, is a bad idea; anything that is not > self-evident from a layman user's point of view is simply not acceptable. > Xprint currently prints to ~/Xprintjobs (if you use the built-in PDF-file or PS-file printer). I'm happy enough to rename it. ~/cups-pdf wouldn't make sense - Xprint is not CUPS (and does ps as well as pdf). I might suggest ~/Printing rather than ~/Printouts, it sounds better to my ears at least. Drew From dparsons at debian.org Thu Oct 27 12:18:40 2005 From: dparsons at debian.org (Drew Parsons) Date: Wed Oct 26 21:19:23 2005 Subject: Bug#317149: [Xprint] Re: Bug#317149: Please change output directory back to $HOME/cups-pdf/ In-Reply-To: <1130374930.7736.11.camel@omena.intranet> References: <20050706162257.GA2416@keitarou.bubblesworth.net> <1130373905.17514.3.camel@pug.anu.edu.au> <1130374930.7736.11.camel@omena.intranet> Message-ID: <1130375920.17514.12.camel@pug.anu.edu.au> On Thu, 2005-10-27 at 04:02 +0300, Martin-?ric Racine wrote: > to, 2005-10-27 kello 10:45 +1000, Drew Parsons kirjoitti: > > > > I might suggest ~/Printing rather than ~/Printouts, it sounds better to > > my ears at least. > > I recently uploaded a package where the output directory is ~/PDF which > is the only sane and obvious choice. Shall we settle on this one? > But Postscript files are not PDF files... Drew From harrison at macau.ctm.net Thu Oct 27 10:49:08 2005 From: harrison at macau.ctm.net (Godfrey Harrison) Date: Wed Oct 26 21:37:08 2005 Subject: [Xprint] XPrint and Gtk2 In-Reply-To: <20050718175021.1a90ea99.christoph@kiosknet.com.br> References: <20050718175021.1a90ea99.christoph@kiosknet.com.br> Message-ID: <43603214.4030401@macau.ctm.net> Hi 'Not much help on this but can say that Mozilla will print without Xprint; it does for me. Maybe old & irrelevant, maybe not, so this! (I get xprint messages because I've forgotten to delete my address from the list & some still interesting me, anyway.) Best Godfrey Christoph Simon wrote: >Hi, > >I was wondering if it is possible to use Xprint from within a gtk2 >program and how I would have to proceed. Would I have to setup a >secondary X connection (to Xprt) and trick gtk somehow to use it, >redisplay the widgets with whatever I want to print (maybe disabling >the window decoration)? Is there some clean way to do it? I know, that >I can get the X-Display from gtk, so I should be able to find the >printer list and configuration options, but what about the page >preview? Is there some simple sample code which I could use for learning? >I think mozilla uses Xprint, but I would like to avoid having to read >all of the mozilla code to find out. > >Thanks, > >Christoph >_______________________________________________ >Xprint mailing list >Xprint@mozdev.org >http://mozdev.org/mailman/listinfo/xprint > > > From dparsons at debian.org Thu Oct 27 13:20:40 2005 From: dparsons at debian.org (Drew Parsons) Date: Wed Oct 26 22:21:16 2005 Subject: [Xprint] XPrint and Gtk2 In-Reply-To: <20050718175021.1a90ea99.christoph@kiosknet.com.br> References: <20050718175021.1a90ea99.christoph@kiosknet.com.br> Message-ID: <1130379640.7311.8.camel@pug.anu.edu.au> On Mon, 2005-07-18 at 17:50 -0300, Christoph Simon wrote: > Hi, > > I was wondering if it is possible to use Xprint from within a gtk2 > program and how I would have to proceed. Would I have to setup a > secondary X connection (to Xprt) and trick gtk somehow to use it, > redisplay the widgets with whatever I want to print (maybe disabling > the window decoration)? Is there some clean way to do it? I know, that > I can get the X-Display from gtk, so I should be able to find the > printer list and configuration options, but what about the page > preview? Is there some simple sample code which I could use for learning? > I think mozilla uses Xprint, but I would like to avoid having to read > all of the mozilla code to find out. > I haven't written an application to use Xprint so I can't give any specific advice. I understand the Xprint interface is something like drawing to screen using the lower level X api. GTK is a higher level interface that hides these lower level details from you, so programming in GTK is simpler than programming in raw X. I presume you've seen the Xprint API docs at http://xprint.mozdev.org/docs/index.html#manpages_3 There's more gory detail at http://xprint.mozdev.org/docs/xp_library/xp_library.html You may find it worth your while to have a look at Cairo. Similarly to Xprint, it is trying to implement the concept of what-you-see-is-what-you-print. But it's API is supposed to be organised at a "higher" level like GTK is. I think it uses Pango for text handling, just as GTK does. Drew From Michel.Correge at cert.fr Thu Oct 27 10:03:06 2005 From: Michel.Correge at cert.fr (Michel Correge) Date: Thu Oct 27 03:05:01 2005 Subject: [Xprint] Xprt stops without any error Message-ID: <200510270703.j9R736e28487@epimetes.cert.fr> > >Does /usr/bin/ps still list the Xprt process? > ps doesn't list any process started by /etc/init.d/xprint. In the log file, I get Xprint server pid=23495 done, exitcode=0. Hint : The machine connecting when Xprt stops has OpenGL installed from Sun, but the crash doesn't happen at each connection. Thanks Michel ------------------------------------------------------------- | Michel CORREGE | | | ONERA/DCSD | Tel : +33-(0)5 62 25 27 70 | | BP 4025 | Fax : +33-(0)5 62 25 25 64 | | 2 Avenue Edouard BELIN | | | 31 055 TOULOUSE CEDEX | E-mail : Michel.Correge@cert.fr | | FRANCE | Web : http://www.cert.fr | ------------------------------------------------------------- From q-funk at iki.fi Thu Oct 27 05:02:09 2005 From: q-funk at iki.fi (=?ISO-8859-1?Q?Martin-=C9ric?= Racine) Date: Thu Oct 27 10:54:29 2005 Subject: Bug#317149: [Xprint] Re: Bug#317149: Please change output directory back to $HOME/cups-pdf/ In-Reply-To: <1130373905.17514.3.camel@pug.anu.edu.au> References: <20050706162257.GA2416@keitarou.bubblesworth.net> <1130373905.17514.3.camel@pug.anu.edu.au> Message-ID: <1130374930.7736.11.camel@omena.intranet> to, 2005-10-27 kello 10:45 +1000, Drew Parsons kirjoitti: > On Wed, 2005-07-06 at 20:59 +0300, Martin-Eric Racine wrote: > > In fairness, I think that CUPS-PDF and Xprint (or any PDF backend) should > > output to a common directory, which could be e.g. ~/Printouts or something > > similar. Then again, this would require teaching users where to find the > > PDF documentss which, by definition, is a bad idea; anything that is not > > self-evident from a layman user's point of view is simply not acceptable. > Xprint currently prints to ~/Xprintjobs (if you use the built-in > PDF-file or PS-file printer). > > I'm happy enough to rename it. ~/cups-pdf wouldn't make sense - Xprint > is not CUPS (and does ps as well as pdf). > > I might suggest ~/Printing rather than ~/Printouts, it sounds better to > my ears at least. I recently uploaded a package where the output directory is ~/PDF which is the only sane and obvious choice. Shall we settle on this one? -- Martin-?ric Racine http://q-funk.iki.fi