From Bugzilla Helper: User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030131 Description of problem: I have an HP LJ4L which I have been trying to configure with redhat-config-printer. In the printer option menu I can choose between 75, 150, 300 and 600 dpi (I pick 300). However when I try to print something it looks like the ghostscript is trying to print in 600 dpi as the image is doubled in size and only half makes it to the paper. Anyway it looks like the printer scripts do not pass the correct string to the underlying scripts used by ghostscript. This happens always with on the post script test-page. Sounds like a foomatic issue. Version-Release number of selected component (if applicable): foomatic-2.0.2-15 How reproducible: Always Steps to Reproduce: 1. See description above 2. 3. Actual Results: Changes of the resolution for printing (DPI) has no effect. Expected Results: Changes of the printer resolution with redhat-print-config should take effect. Additional info: # printconf-tui --Xexport Daten�bergabe unterbrochen (broken pipe) [root@bennew01 endur]# <?xml version="1.0"?> <adm_context VERSION="0"> <id NAME="local" SERIAL="1049716234"> <null/> <null/> </id> <datatree> <printconf TYPE="LIST"> <print_queues TYPE="LIST"> <lp ATOMIC="TRUE" TYPE="LIST"> <alias_list ANONYMOUS="TRUE" TYPE="LIST"> </alias_list> <queue_description TYPE="STRING" VALUE="Minolta"/> <queue_type TYPE="STRING" VALUE="LOCAL"/> <queue_data TYPE="LIST"> <local_printer_device TYPE="STRING" VALUE="/dev/lp0"/> </queue_data> <filter_data TYPE="LIST"> <print_header_page TYPE="BOOL" VALUE="FALSE"/> <flags TYPE="LIST"> <rerender_Postscript TYPE="BOOL" VALUE="TRUE"/> <convert_text_to_Postscript TYPE="BOOL" VALUE="TRUE"/> <send_FF TYPE="BOOL" VALUE="FALSE"/> <assume_data_is_text TYPE="BOOL" VALUE="TRUE"/> <send_EOT TYPE="BOOL" VALUE="FALSE"/> </flags> <mf_type TYPE="STRING" VALUE="MFOMATIC"/> <filter_locale TYPE="STRING" VALUE="C"/> <printer_id TYPE="STRING" VALUE="491506"/> <gs_driver TYPE="STRING" VALUE="ljet4"/> <foomatic_defaults ANONYMOUS="TRUE" TYPE="LIST"> <option_default TYPE="LIST"> <name TYPE="STRING" VALUE="PageSize"/> <type TYPE="STRING" VALUE="enum"/> <default TYPE="STRING" VALUE="A4"/> </option_default> <option_default TYPE="LIST"> <name TYPE="STRING" VALUE="Resolution"/> <type TYPE="STRING" VALUE="enum"/> <default TYPE="STRING" VALUE="300"/> </option_default> </foomatic_defaults> </filter_data> <filter_type TYPE="STRING" VALUE="MAGICFILTER"/> <jobsheets TYPE="LIST"> <start TYPE="STRING" VALUE="none"/> <end TYPE="STRING" VALUE="none"/> </jobsheets> <margins TYPE="LIST"> <top TYPE="INT" VALUE="36"/> <right TYPE="INT" VALUE="36"/> <bottom TYPE="INT" VALUE="36"/> <left TYPE="INT" VALUE="36"/> </margins> <lpoptions TYPE="LIST"> <cpi TYPE="STRING" VALUE="12"/> <lpi TYPE="STRING" VALUE="7"/> <page-bottom TYPE="STRING" VALUE="36"/> <page-left TYPE="STRING" VALUE="36"/> <page-right TYPE="STRING" VALUE="36"/> <page-top TYPE="STRING" VALUE="36"/> <scaling TYPE="STRING" VALUE="100"/> <wrap TYPE="STRING" VALUE="true"/> </lpoptions> </lp> </print_queues> </printconf> </datatree> </adm_context>
Please try sending the output to a temporary file, like this: 1. touch /tmp/lp0 2. chown lp.lp /tmp/lp0 3. chmod u+w /tmp/lp0 4. Run redhat-config-printer 5. Set queue type to local, custom device /tmp/lp0 6. Apply changes 7. Print test page In the first few lines of /tmp/lp0 you should see: <</HWResolution[300 300]>>setpagedevice Do you?
Unfortunately, no. I don't understand step 2 2. chown lp.lp /tmp/lp0 but this is not related. I can write to /tmp/lp0 chmod 666. The first few lines are od the output are: 12345X@PJL @PJL SET MANUALFEED=OFF @PJL SET DUPLEX=ON @PJL SET BINDING=SHORTEDGE @PJL SET RET=MEDIUM @PJL SET COPIES=1 @PJL SET ECONOMODE=OFF E&l26A&l0o0l0E&l-180u36Z*r0F&u600D&l1X*rB*p0x0Y*t600R
Have tried from another box, using remote printing. RH 7.2. There is a diff: @PJL EOJ %-12345X@PJL JOB NAME="MFOMATIC" @PJL SET COPIES=1 @PJL SET RET=MEDIUM @PJL SET ECONOMODE=OFF @PJL SET MANUALFEED=OFF @PJL SET DENSITY=3 E&l26A&l0o0l0E&l-180u36Z*r0F&u300D*rB*p0x0Y*t300R*p+ As you can see 300 instead of 600.
[This is LPRng.] In /usr/sbin/lpdomatic, there is a line 'my $verbose = 0;'. Please change that to '1' and try again. There will be a log file created in /tmp. Could you please attach that? Thanks.
Created attachment 90961 [details] Log file of lpdomatic with $debug=1
Please try changing /usr/sbin/lpdomatic, line 490, from: if ($cmdvar =~ /S/) { to if (1 or $cmdvar =~ /S/) { Does that make it work for you?
if (1 or $cmdvar =~ /S/) { Yes, this make it work for me.
Aha, the maintainer says that the intention was this: if ($cmdvar =~ /\S/) { Now it makes sense.
if ($cmdvar =~ /\S/) { The regex \/S/ matches [^r\t\n\f]. Ohh.. stupid... we had forgotten the backlash. Yes, now it makes sense ;-)
The Foomatic 2.0.x CVS and the "lpdomatic" and "directomatic" scripts on linuxprinting.org I have fixed now, in the other filter scripts and Foomatic 3.0.x the bug is not present.
An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2003-185.html