From orangevixen at wolfsinger.com Wed Oct 18 23:36:25 2006 From: orangevixen at wolfsinger.com (orangevixen at wolfsinger.com) Date: Wed, 18 Oct 2006 23:36:25 -0700 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: ; from xprint-request@mozdev.org on Tue, Oct 17, 2006 at 00:49:38 -0700 References: Message-ID: <20061019063625.GB12653@localhost.ccinet.com> Hi, I was not able to search the lists if this question was already answered (list search page goes to list archive download page) and I did not find it in the FAQ. When I use XPutImage() with a 24 bit depth TrueColor X Visual to put a colored image on to X Print's drawable, the colors that are not pure in color (such as yellowish grey) come out as gray or some other color. I am not an expert on printing but I was wondering if I need to do the "dithering" on my client side or does X Print do this past its DDX level? I have an HP Deskjet 870 CXI and I was wondering if there is a model config file I should use (instead of the all purpose PS model). I wasn't able to find a place to download model config files on the FAQ or the web page. -Tara From dparsons at debian.org Thu Oct 19 00:41:05 2006 From: dparsons at debian.org (Drew Parsons) Date: Thu, 19 Oct 2006 17:41:05 +1000 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: <20061019063625.GB12653@localhost.ccinet.com> References: <20061019063625.GB12653@localhost.ccinet.com> Message-ID: <1161243665.29490.22.camel@localhost.localdomain> On Wed, 2006-10-18 at 23:36 -0700, orangevixen at wolfsinger.com wrote: > Hi, I was not able to search the lists if this question was already > answered (list search page goes to list archive download page) and I did > not find it in the FAQ. > > When I use XPutImage() with a 24 bit depth TrueColor X Visual to put a > colored image on to X Print's drawable, the colors that are not pure in > color (such as yellowish grey) come out as gray or some other color. > > I am not an expert on printing but I was wondering if I need to do the > "dithering" on my client side or does X Print do this past its DDX level? > > I have an HP Deskjet 870 CXI and I was wondering if there is a model > config file I should use (instead of the all purpose PS model). I wasn't > able to find a place to download model config files on the FAQ or the web > page. > > -Tara Hi Tara, Xprint is in something of a "janitorial" state, so there may not be a true expert here to provide the correct answer you're after. If you're creating an app to print from, you might want to see if Cairo meets your needs. Cairo in a sense supersedes Xprint. To help with your troubleshooting, one suggestion might be to print to alternate printers, in particular to the PDF "printer" (xp_pdf_spooldir). The output pdf file is sent to /tmp/Xprintjobs/ (or ~/Xprintjobs/ on Debian). Is the result any different that way? You could similarly print to a postscript file and see how amenable the output is to the standard postscript utilities. Drew From dparsons at debian.org Thu Oct 19 22:53:03 2006 From: dparsons at debian.org (Drew Parsons) Date: Fri, 20 Oct 2006 15:53:03 +1000 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: <20061020043158.GA16366@localhost.ccinet.com> References: <20061019063625.GB12653@localhost.ccinet.com> <1161243665.29490.22.camel@localhost.localdomain> <20061020043158.GA16366@localhost.ccinet.com> Message-ID: <1161323583.5409.10.camel@localhost.localdomain> On Thu, 2006-10-19 at 21:32 -0700, orangevixen at wolfsinger.com wrote: > On 2006.10.19 00:41 Drew Parsons wrote: > > > Hi Tara, Xprint is in something of a "janitorial" state, so there may > > not be a true expert here to provide the correct answer you're after. > > If you're creating an app to print from, you might want to see if Cairo > > meets your needs. Cairo in a sense supersedes Xprint. > > I remember installing Cairo months ago but it took a lot of work to get it > working and I didn't want to rely on something that seemed to be a work in > progress at that time. Ok, that's "good" to know. It strengthens the justification for continuing to support Xprint as best we can. > > To help with your troubleshooting, one suggestion might be to print to > > alternate printers, in particular to the PDF > > "printer" (xp_pdf_spooldir). The output pdf file is sent > > to /tmp/Xprintjobs/ (or ~/Xprintjobs/ on Debian). Is the result any > > different that way? You could similarly print to a postscript file and > > see how amenable the output is to the standard postscript utilities. > > Thanks, I produced a PS image and it looked DIFFERENT, I've attached > screen shots if that is okay. And ideas on the color differences? It looks > like a lack of greyness? I tried printing your png using Xprint from firefox, both to postscript and to pdf. In both cases the image came out flawlessly, that is, a red sunset without the blue in your output. I only checked on-screen, I don't have a colour printer readily accessible. > If you want to know the program I'm using to print, it's one I wrote > myself Did you test Xprint using firefox or mozilla? I haven't tried your program yet, but if mozilla/firefox does work for you then I suppose there might be some initialisation call that you need to add. Perhaps looking at the firefox source code might help? If firefox prints blue for you too, then perhaps you could check you've got latest versions, in particular of the config files. For reference, I'm running Debian unstable, using Xprint 1.1.99.3 over X11R7.1 libs. Drew p.s. keep CC:ing the mailing list if you don't mind, in case others experience similar problems From orangevixen at wolfsinger.com Fri Oct 20 19:56:36 2006 From: orangevixen at wolfsinger.com (orangevixen at wolfsinger.com) Date: Fri, 20 Oct 2006 19:56:36 -0700 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: <1161323583.5409.10.camel@localhost.localdomain>; from dparsons@debian.org on Thu, Oct 19, 2006 at 22:53:03 -0700 References: <20061019063625.GB12653@localhost.ccinet.com> <1161243665.29490.22.camel@localhost.localdomain> <20061020043158.GA16366@localhost.ccinet.com> <1161323583.5409.10.camel@localhost.localdomain> Message-ID: <20061021025632.GA21704@localhost.ccinet.com> Hi, Yes you can post it to the list, I was not sure if attachments were allowed so that is why I didn't. I did some testing and I found out that I did have a bug in my code that produced part of the problem. But after correcting it I still have the other part of the problem. The screenshots speak for themselves. The last one (printed.jpg) is a picture of the actual print out I took with my digital camera. I get the same result with both my IV program and Mozilla, so I know it's somewhere between X Print and my Deskjet 870 now. When I use GIMP to print the same image I get the full quality so I know GIMP's print plugin has it right (but it dosen't use X Print). Any suggestions on what I should look into? I think I'm still using X11 R6. -Tara -------------- next part -------------- A non-text attachment was scrubbed... Name: src.png Type: image/png Size: 385448 bytes Desc: not available Url : http://mozdev.org/pipermail/xprint/attachments/20061020/d4a8fd05/attachment-0001.png -------------- next part -------------- A non-text attachment was scrubbed... Name: gv.jpg Type: image/jpeg Size: 52122 bytes Desc: not available Url : http://mozdev.org/pipermail/xprint/attachments/20061020/d4a8fd05/attachment-0002.jpg -------------- next part -------------- A non-text attachment was scrubbed... Name: printed.jpg Type: image/jpeg Size: 89146 bytes Desc: not available Url : http://mozdev.org/pipermail/xprint/attachments/20061020/d4a8fd05/attachment-0003.jpg From dparsons at debian.org Sat Oct 21 04:04:43 2006 From: dparsons at debian.org (Drew Parsons) Date: Sat, 21 Oct 2006 21:04:43 +1000 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: <20061021025632.GA21704@localhost.ccinet.com> References: <20061019063625.GB12653@localhost.ccinet.com> <1161243665.29490.22.camel@localhost.localdomain> <20061020043158.GA16366@localhost.ccinet.com> <1161323583.5409.10.camel@localhost.localdomain> <20061021025632.GA21704@localhost.ccinet.com> Message-ID: <1161428683.7937.41.camel@localhost.localdomain> On Fri, 2006-10-20 at 19:56 -0700, orangevixen at wolfsinger.com wrote: > Hi, Yes you can post it to the list, I was not sure if attachments were > allowed so that is why I didn't. Oh yeah, I didn't think about the screenshots... :) > I did some testing and I found out that I did have a bug in my code that > produced part of the problem. But after correcting it I still have the > other part of the problem. The screenshots speak for themselves. The last > one (printed.jpg) is a picture of the actual print out I took with my > digital camera. > > I get the same result with both my IV program and Mozilla, so I know it's > somewhere between X Print and my Deskjet 870 now. When I use GIMP to print > the same image I get the full quality so I know GIMP's print plugin has it > right (but it dosen't use X Print). > > Any suggestions on what I should look into? I think I'm still using X11 R6. > The middle one displaying gv, is that viewing the Xprint output postscript file on screen? If so, that suggests Xprint is doing the right thing, at least for a certain value of "right". If that's the case, then I might suggest the error is in the physical printing subsystem, that is the system which Xprint invokes to actually process and send the image to file. That is, whatever the lp or lpr command uses to process postscript files. If your printer is not a postscript printer (which I believe is the case with the Deskjets) then lp will probably preprocess a postscript file using ghostscript (gs). You could try printing the original file using gs (the command line options will no doubt be rather fiddly) and see if it's just as bad as the Xprint result. Or you could use gimp to save the original file to postscript and then print that with lp (easier than gs) rather than using gimp's print plugin. If the problem is in lp/gs preprocessing, the reason you don't see the problem from gimp is that the gimp's print plugin does its own processing, and it seems to be somewhat cleverer about it (I'm not sure why gs don't just use the same code, if it's better, but I've noticed before with my own B&W printer that gimp does it better). On the same note, to further exonerate Xprint, you could load the Xprint output postscript file into gimp, and then print using gimp's print driver. I'm guessing it will give you the correct result, same as printing the original via gimp. If you prove gs preprocessing to be the problem, you could check your gs version or the print driver (for CUPS?) you're using (look for an update at linuxprinting.org)? If on the other hand none of this helps, then it might be a good idea to post the Xprint output postscript file. I could find a colour printer to try it on. Another last possibility is to activate the Xprint PCL driver, if the Deskjet model supports PCL (I'm not sure if it does), and try it rather than the postscript one. But I've never tried that option myself, I only know it exists! By the way, which X11R6 are you using? Drew From dparsons at debian.org Sat Oct 21 04:26:35 2006 From: dparsons at debian.org (Drew Parsons) Date: Sat, 21 Oct 2006 21:26:35 +1000 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: <1161428683.7937.41.camel@localhost.localdomain> References: <20061019063625.GB12653@localhost.ccinet.com> <1161243665.29490.22.camel@localhost.localdomain> <20061020043158.GA16366@localhost.ccinet.com> <1161323583.5409.10.camel@localhost.localdomain> <20061021025632.GA21704@localhost.ccinet.com> <1161428683.7937.41.camel@localhost.localdomain> Message-ID: <1161429995.7937.45.camel@localhost.localdomain> On Sat, 2006-10-21 at 21:04 +1000, Drew Parsons wrote: > Another last possibility is to activate the Xprint PCL driver, if the > Deskjet model supports PCL (I'm not sure if it does), and try it rather > than the postscript one. But I've never tried that option myself, I only > know it exists! Speaking of which, there is a HPDJ1600C model config already available in Xprint (which I understand invokes PCL). Using it rather than the default PSdefault is another option to play with (just a matter of changing the entry in .../C/print/attributes/printer I believe). Drew From orangevixen at wolfsinger.com Sun Oct 22 00:23:12 2006 From: orangevixen at wolfsinger.com (orangevixen at wolfsinger.com) Date: Sun, 22 Oct 2006 00:23:12 -0700 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: <1161428683.7937.41.camel@localhost.localdomain>; from dparsons@debian.org on Sat, Oct 21, 2006 at 04:04:43 -0700 References: <20061019063625.GB12653@localhost.ccinet.com> <1161243665.29490.22.camel@localhost.localdomain> <20061020043158.GA16366@localhost.ccinet.com> <1161323583.5409.10.camel@localhost.localdomain> <20061021025632.GA21704@localhost.ccinet.com> <1161428683.7937.41.camel@localhost.localdomain> Message-ID: <20061022072312.GG26373@localhost.ccinet.com> Hi, I use lpr to print. I did a test with opening the original src.png image in GIMP and then having GIMP saving it to a Postscript .ps file and then printing it using lpr. The result was the same (bad results) as if I printed it with IV and Mozilla using X Print. So do you think that it tells us anything? I'm really not sure how GIMP's print plugin calls lpr and that some how it is giving it more information or something. I'm not sure how to enable the PCL feature in X Print can you tell me how? thanks! -Tara On 2006.10.21 04:04 Drew Parsons wrote: > The middle one displaying gv, is that viewing the Xprint output > postscript file on screen? If so, that suggests Xprint is doing the > right thing, at least for a certain value of "right". > If that's the case, then I might suggest the error is in the physical > printing subsystem, that is the system which Xprint invokes to actually > process and send the image to file. That is, whatever the lp or lpr > command uses to process postscript files. > > If your printer is not a postscript printer (which I believe is the case > with the Deskjets) then lp will probably preprocess a postscript file > using ghostscript (gs). You could try printing the original file using > gs (the command line options will no doubt be rather fiddly) and see if > it's just as bad as the Xprint result. Or you could use gimp to save > the original file to postscript and then print that with lp (easier than > gs) rather than using gimp's print plugin. > > If the problem is in lp/gs preprocessing, the reason you don't see the > problem from gimp is that the gimp's print plugin does its own > processing, and it seems to be somewhat cleverer about it (I'm not sure > why gs don't just use the same code, if it's better, but I've noticed > before with my own B&W printer that gimp does it better). > > On the same note, to further exonerate Xprint, you could load the Xprint > output postscript file into gimp, and then print using gimp's print > driver. I'm guessing it will give you the correct result, same as > printing the original via gimp. > > If you prove gs preprocessing to be the problem, you could check your gs > version or the print driver (for CUPS?) you're using (look for an update > at linuxprinting.org)? > > If on the other hand none of this helps, then it might be a good idea to > post the Xprint output postscript file. I could find a colour printer to > try it on. > > Another last possibility is to activate the Xprint PCL driver, if the > Deskjet model supports PCL (I'm not sure if it does), and try it rather > than the postscript one. But I've never tried that option myself, I only > know it exists! > > By the way, which X11R6 are you using? > > Drew > > From orangevixen at wolfsinger.com Sun Oct 22 00:53:40 2006 From: orangevixen at wolfsinger.com (orangevixen at wolfsinger.com) Date: Sun, 22 Oct 2006 00:53:40 -0700 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: <1161429995.7937.45.camel@localhost.localdomain>; from dparsons@debian.org on Sat, Oct 21, 2006 at 04:26:35 -0700 References: <20061019063625.GB12653@localhost.ccinet.com> <1161243665.29490.22.camel@localhost.localdomain> <20061020043158.GA16366@localhost.ccinet.com> <1161323583.5409.10.camel@localhost.localdomain> <20061021025632.GA21704@localhost.ccinet.com> <1161428683.7937.41.camel@localhost.localdomain> <1161429995.7937.45.camel@localhost.localdomain> Message-ID: <20061022075340.GA27857@localhost.ccinet.com> I just found something that worked, if I use gs as follows: /usr/bin/gs -sDEVICE=cdjcolor -sOutputFile=\|lpr myfile.ps It prints the .ps file correctly (with the same coloring as GIMP) so now I need to figure out how to get X Print to call something like that. I found that there is a line in the X Print attributes/printer file: HPDeskJet870.xp-spooler-command: /usr/bin/lpr -P%printer-name% -#%copy-count% -J %job-name% But I don't know how to rewrite that to use gs in the above situation, do you have any ideas? Thanks, -Tara From dparsons at debian.org Sun Oct 22 02:59:57 2006 From: dparsons at debian.org (Drew Parsons) Date: Sun, 22 Oct 2006 19:59:57 +1000 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: <20061022075340.GA27857@localhost.ccinet.com> References: <20061019063625.GB12653@localhost.ccinet.com> <1161243665.29490.22.camel@localhost.localdomain> <20061020043158.GA16366@localhost.ccinet.com> <1161323583.5409.10.camel@localhost.localdomain> <20061021025632.GA21704@localhost.ccinet.com> <1161428683.7937.41.camel@localhost.localdomain> <1161429995.7937.45.camel@localhost.localdomain> <20061022075340.GA27857@localhost.ccinet.com> Message-ID: <1161511197.7937.68.camel@localhost.localdomain> On Sun, 2006-10-22 at 00:53 -0700, orangevixen at wolfsinger.com wrote: > I just found something that worked, if I use gs as follows: > > /usr/bin/gs -sDEVICE=cdjcolor -sOutputFile=\|lpr myfile.ps > > It prints the .ps file correctly (with the same coloring as GIMP) so now I > need to figure out how to get X Print to call something like that. Ah good, I suspected it might have been something like that. > I found that there is a line in the X Print attributes/printer file: > > HPDeskJet870.xp-spooler-command: /usr/bin/lpr -P%printer-name% > -#%copy-count% -J %job-name% > > But I don't know how to rewrite that to use gs in the above situation, do > you have any ideas? Your tests indicate the problem is with lpr rather than Xprint. Xprint generates postscript and then just passes it on to lpr to forward on to the printer. So rather than trying to adapt the Xprint configuration (it could probably be done, but might be tricky), it will be simpler to fix your lpr configuration instead. The advantage of this solution is that it will also fix printing from anywhere else (e.g. command line, xpdf), not just Xprint. You'll need to find out what is controlling lpr. It might be lprng for instance. It will have some config files somewhere, where you will be able to define the preprocessor ( the gs command). If you can't find it easily, then I would recommend using CUPS instead to manage lpr, it's a lot simpler to configure than lprng. You can access http://localhost:631/ to manage the printers via a webbrowser GUI. You could also make sure the driver for your particular printer is up to date by grabbing the latest one from linuxprinting.org. It's probably worth reading linuxprinting.org. I think they also have some help pages for lprng if you want to stick with that. Drew From orangevixen at wolfsinger.com Sun Oct 22 23:36:59 2006 From: orangevixen at wolfsinger.com (orangevixen at wolfsinger.com) Date: Sun, 22 Oct 2006 23:36:59 -0700 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: <1161511197.7937.68.camel@localhost.localdomain>; from dparsons@debian.org on Sun, Oct 22, 2006 at 02:59:57 -0700 References: <20061019063625.GB12653@localhost.ccinet.com> <1161243665.29490.22.camel@localhost.localdomain> <20061020043158.GA16366@localhost.ccinet.com> <1161323583.5409.10.camel@localhost.localdomain> <20061021025632.GA21704@localhost.ccinet.com> <1161428683.7937.41.camel@localhost.localdomain> <1161429995.7937.45.camel@localhost.localdomain> <20061022075340.GA27857@localhost.ccinet.com> <1161511197.7937.68.camel@localhost.localdomain> Message-ID: <20061023063659.GA1273@localhost.ccinet.com> On 2006.10.22 02:59 Drew Parsons wrote: > You'll need to find out what is controlling lpr. It might be lprng for > instance. It will have some config files somewhere, where you will be > able to define the preprocessor ( the gs command). I looked through the configuration of my lpr and it looks like it simply takes the .ps file generated by X Print and sends it directly to the printer. The problem is that no where in the lpr manual page does it say I can apply a postscript filter. I'm afraid I don't use CUPS, I tried to last year but I could not get it working and I'm not that fluent in administration (I'm a ergonmist/programmer). I also was not able to find out what controls lpr, I think X Print calls lpr directly, at least that is what I have set up in the attributes/printer I'll try and look to see where I can insert a call to gs somewhere past the lpr process but I DOUBT I can figure it out on my own so if you have any suggestions I would greatly appreciate it! *grin* Thanks for all yer help! -Tara From dparsons at debian.org Tue Oct 24 02:22:04 2006 From: dparsons at debian.org (Drew Parsons) Date: Tue, 24 Oct 2006 19:22:04 +1000 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: <20061023063659.GA1273@localhost.ccinet.com> References: <20061019063625.GB12653@localhost.ccinet.com> <1161243665.29490.22.camel@localhost.localdomain> <20061020043158.GA16366@localhost.ccinet.com> <1161323583.5409.10.camel@localhost.localdomain> <20061021025632.GA21704@localhost.ccinet.com> <1161428683.7937.41.camel@localhost.localdomain> <1161429995.7937.45.camel@localhost.localdomain> <20061022075340.GA27857@localhost.ccinet.com> <1161511197.7937.68.camel@localhost.localdomain> <20061023063659.GA1273@localhost.ccinet.com> Message-ID: <1161681724.24246.25.camel@localhost.localdomain> On Sun, 2006-10-22 at 23:36 -0700, orangevixen at wolfsinger.com wrote: > On 2006.10.22 02:59 Drew Parsons wrote: > > > You'll need to find out what is controlling lpr. It might be lprng for > > instance. It will have some config files somewhere, where you will be > > able to define the preprocessor ( the gs command). > > I looked through the configuration of my lpr and it looks like it simply > takes the .ps file generated by X Print and sends it directly to the > printer. The problem is that no where in the lpr manual page does it say I > can apply a postscript filter. > > I'm afraid I don't use CUPS, I tried to last year but I could not get it > working and I'm not that fluent in administration (I'm a > ergonmist/programmer). I also was not able to find out what controls lpr, > I think X Print calls lpr directly, at least that is what I have set up in > the attributes/printer > > I'll try and look to see where I can insert a call to gs somewhere past > the lpr process but I DOUBT I can figure it out on my own so if you have > any suggestions I would greatly appreciate it! *grin* There would be some clues under the LPD section at linuxprinting.org. It's related to the if= entry in /etc/printcap but I haven't used it in a long while so I can't help more than that. I might suggest giving CUPS another try, did you try using the webbrowser gui for it last time? Drew From orangevixen at wolfsinger.com Tue Oct 24 03:01:55 2006 From: orangevixen at wolfsinger.com (orangevixen at wolfsinger.com) Date: Tue, 24 Oct 2006 03:01:55 -0700 Subject: [Xprint] HP Deskjet 870 model config files and color problems In-Reply-To: <005b01c6f676$82528de0$8bed6081@stafflib.flinders.edu.au>; from Matthew.Hooper@flinders.edu.au on Mon, Oct 23, 2006 at 00:40:27 -0700 References: <005b01c6f676$82528de0$8bed6081@stafflib.flinders.edu.au> Message-ID: <20061024100155.GA9085@localhost.ccinet.com> Hi, I got it working, I was able to configure the lpd print scripts to call the appropriate GS command. That is what was needed to print with the correct coloring. My only problem now is trying to figure out how to get X Print to sort its list of printers. All my printers are in /etc/printcap but X Print loads them in some order that I don't understand and it is not to the order or even reverse order of how they are listed in /etc/printcap. Matt, I'm afraid I was never able to get CUPS to work. I might try again in the future. I am not an administrator and I'm not very good at setting up computers. I'm primarly a programmer and graphics artist. I wanted to thank everyone for their patience with me on my ridiculous hunt for a problem that was fixed but on the positive note that it proved that X Print worked out. :) Thanks, -Tara