Bug 88171 - DPI changes with redhat-config-printer-gui without any effect
DPI changes with redhat-config-printer-gui without any effect
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: foomatic (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-07 07:53 EDT by Matthias Haase
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-09 05:56:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Log file of lpdomatic with $debug=1 (2.05 KB, text/plain)
2003-04-07 12:18 EDT, Matthias Haase
no flags Details

  None (edit)
Description Matthias Haase 2003-04-07 07:53:51 EDT
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>
Comment 1 Tim Waugh 2003-04-07 09:57:39 EDT
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?
Comment 2 Matthias Haase 2003-04-07 10:41:09 EDT
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
Comment 3 Matthias Haase 2003-04-07 10:44:51 EDT
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.
Comment 4 Tim Waugh 2003-04-07 11:59:02 EDT
[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.
Comment 5 Matthias Haase 2003-04-07 12:18:54 EDT
Created attachment 90961 [details]
Log file of lpdomatic with $debug=1
Comment 6 Tim Waugh 2003-04-08 04:51:06 EDT
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?
Comment 7 Matthias Haase 2003-04-08 08:21:10 EDT
 if (1 or $cmdvar =~ /S/) {
Yes, this make it work for me.
Comment 8 Tim Waugh 2003-04-08 12:45:03 EDT
Aha, the maintainer says that the intention was this:

if ($cmdvar =~ /\S/) {

Now it makes sense.
Comment 9 Matthias Haase 2003-04-08 12:57:10 EDT
if ($cmdvar =~ /\S/) {

The regex  \/S/ matches [^r\t\n\f].
Ohh.. stupid... we had forgotten the backlash.
Yes, now it makes sense ;-)
Comment 10 Till Kamppeter 2003-04-08 13:01:48 EDT
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.

Comment 11 Tim Waugh 2003-06-09 05:56:56 EDT
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

Note You need to log in before you can comment on or make changes to this bug.