bug-ghostscript
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HP4si duplex shifted output problem


From: Art Hughes
Subject: Re: HP4si duplex shifted output problem
Date: Wed, 28 Nov 2001 02:32:22 -0700

Hi,
I've done more research into the problem, seems there is a bug in GS
I've tracked down to the 
gdevdjet.c code file.  For some background, when data is sent to the
printer in duplex mode the back side image rotated 180deg. is printed
first.   The paper paper is then transported in the duplex unit filpping
the page over and then feeding back into the printer to print the front
side of the page.  The printer however uses the same offsets (left and
top) sent to it by GS to print both front and back.  This allows the
unrotated front side image to be printed correctly and the rotated back
side image to be shifted by 2X the offsets.

The following code in gdevdjet.c contains the problem:

private int
ljet4d_print_page_copies(gx_device_printer * pdev, FILE * prn_stream,
                         int num_copies)
{
    int dots_per_inch = (int)pdev->y_pixels_per_inch;
    char real_init[60];

    sprintf(real_init, "\033&l-180u36Z\033*r0F\033&u%dD",
dots_per_inch);
    return dljet_mono_print_page_copies(pdev, prn_stream, num_copies,
                                        dots_per_inch,
PCL_LJ4D_FEATURES,
                                        real_init);
}

The offsets sent to the printer ( \033&l-180u36Z ) are hardcoded!  The
-180 and 36 need to change polarity to match the front and back of the
page.  The back is allways printed first, then the front so the commands
should be "\033&l180u-36Z" for the back and "\033&l-180u36Z" for the
front of the page.

If the Author could give me direction as to the best approch to fix the
problem I would be happy to code it.

Thanks,
Art Hughes


Art Hughes wrote:
> 
> Hi,
> I have an HP4si printer with duplexer option.  I'm using mandrake 8.1
> with CUPS using the "Foomatic + ljet4" driver supplied via GS-6.51.
> When I print a file in duplex mode
> 
> "lp -o sides=two-sided-long-edge"
> 
> the second or even page image printed on the back side of the paper is
> allways shifted to the right by 0.75 inch.  If I print to the same
> printer from an M$ NT4 machine with HP's driver the printer prints
> without any problems.
> 
> Any Ideas?
> Thanks,
> Art



reply via email to

[Prev in Thread] Current Thread [Next in Thread]