From: Till Kamppeter <till.kamppeter@gmail.com>
To: "Suffield, David" <david.suffield@hp.com>
Cc: "printing-architecture@lists.linux-foundation.org"
<printing-architecture@lists.linux-foundation.org>,
gs-devel <gs-devel@ghostscript.com>,
Michael Sweet <mike@easysw.com>,
"Cauligi, Raghothama S" <raghothama.cauligi@hp.com>
Subject: Re: [Printing-architecture] Fixes and changes on the "cups" output device of Ghostscript -Please Test!
Date: Thu, 21 May 2009 01:03:17 +0200 [thread overview]
Message-ID: <4A148C35.8050704@gmail.com> (raw)
In-Reply-To: <DD6046532A44F047ACD45225E9D737B14A40FFAF11@GVW1155EXB.americas.hpqcorp.net>
I have fixed the problem now in the SVN of Ghostscript (rev 9747). Or
apply the corrected patch:
http://www.openprinting.org/download/printing/ghostscript-cups-patches/cups-device-pagesize-margins-duplex-fixes.patch
See the fix iteself below.
Till
----------------------------------------------------------------------
Index: cups/gdevcups.c
===================================================================
--- cups/gdevcups.c (revision 9738)
+++ cups/gdevcups.c (working copy)
@@ -378,7 +378,7 @@
/* cupsString */
"", /* cupsMarkerType */
"", /* cupsRenderingIntent */
- "Letter" /* cupsPageSizeName */
+ "" /* cupsPageSizeName */
#endif /* CUPS_RASTER_SYNCv1 */
},
0 /* landscape */
@@ -2798,6 +2798,7 @@
float swap;
int xflip = 0,
yflip = 0;
+ int found = 0;
dprintf2("DEBUG2: cups_put_params(%p, %p)\n", pdev, plist);
@@ -3071,7 +3072,26 @@
yflip = 0;
}
+#ifdef CUPS_RASTER_SYNCv1
/*
+ * Chack whether cupsPageSizeName has a valid value
+ */
+
+ if (strlen(cups->header.cupsPageSizeName) != 0) {
+ found = 0;
+ for (i = cupsPPD->num_sizes, size = cupsPPD->sizes;
+ i > 0;
+ i --, size ++)
+ if (strcasecmp(cups->header.cupsPageSizeName, size->name) == 0) {
+ found = 1;
+ break;
+ }
+ if (found == 0) cups->header.cupsPageSizeName[0] = '\0';
+ }
+ dprintf1("DEBUG2: cups->header.cupsPageSizeName = %s\n",
cups->header.cupsPageSizeName);
+#endif
+
+ /*
* Find the matching page size...
*/
Suffield, David wrote:
> Sorry, I sent you the wrong test PPD.
>
> -dave
>
>> -----Original Message-----
>> From: Till Kamppeter [mailto:till.kamppeter@gmail.com]
>> Sent: Tuesday, May 19, 2009 11:45 AM
>> To: Suffield, David
>> Cc: Michael Sweet; Yie, Shiyun;
>> printing-architecture@lists.linux-foundation.org; gs-devel;
>> Cauligi, Raghothama S
>> Subject: Re: Fixes and changes on the "cups" output device of
>> Ghostscript -Please Test!
>>
>> Suffield, David wrote:
>>> Till,
>>> I applied your patch to ghostscript 8.64. After testing
>> your patch with a fullbleed 4x6 paper size it looks like the
>> paper size and printable area are not calculated correctly.
>> The same full bleed test works ok with ghostscript 8.62.
>>> I have attached the test PPD and CUPS error_log(s) for
>> reference. Note the CUPS's ImagingBoundingBox was
>> "ImaginBoundingBox = [ 9 9 289 433 ]" when it should be
>> "ImaginBoundingBox = [0 0 298 442 ]".
>> How did you tell to CUPS that the job is fullbleed? The PPD
>> has non-zero
>> borders for all paper sizes.
>>
>> It seems also that pstoraster or pstops does not supply
>> something useful
>> for the "cu[psPageSizeName", as error_log shows the following:
>>
>> D [15/May/2009:14:39:26 -0700] [Job 383] Setting cupsPageSizeName to
>> "74%%BeginFeature: *PageRegion
>> 10074^D^D^D%%BeginSetup%%EndProlog%%EndResource%rom%Resource/I
>> diomSet/*/*"...
>>
>> The name is important to distinguish page sizes with the same
>> dimensions
>> but different margins.
>>
>>> Looking at the fullbleed-bad.txt error log it looks like
>> gdevcups.c has mistakenly declared this a custom paper size
>> instead of the fullbleed 4x6 paper size and thus uses the
>> custom paper size printable margins of "margins[] = [ 0.125
>> 0.125 0.125 0.125 ]" instead of [ 0 0 0 0 ].
>>> Your patch worked ok with the normal "Letter" paper size.
>> Try something like
>>
>> *DefaultPageSize: LetterDuplex
>> *PageSize Letter/Letter 8.5x11in: "<</PageSize[612 792]/ImagingBBox
>> null/cupsPageSizeName(Letter)>>setpagedevice"
>> *PageSize LetterDuplex/Letter AutoDuplex 8.5x11in: "<</PageSize[612
>> 783]/ImagingBBox null/cupsPageSizeName(LetterDuplex)>>setpagedevice"
>> **PageSize A4/A4 210x297mm: "<</PageSize[595 842]/ImagingBBox
>> null/cupsPageSizeName(A4)>>setpagedevice"
>> *PageSize A4Duplex/A4 AutoDuplex 210x297mm: "<</PageSize[595
>> 833]/ImagingBBox null/cupsPageSizeName(A4Duplex)>>setpagedevice"
>> *PageSize Legal/Legal 8.5x14in: "<</PageSize[612 1008]/ImagingBBox
>> null/cupsPageSizeName(Legal)>>setpagedevice"
>> *PageSize Photo/Photo 4x6in: "<</PageSize[288 432]/ImagingBBox
>> null/cupsPageSizeName(Photo)>>setpagedevice"
>> *PageSize PhotoFullbleed/Photo 4x6in borderless: "<</PageSize[288
>> 432]/ImagingBBox null/cupsPageSizeName(PhotoFullbleed)>>setpagedevice"
>> *PageSize Photo5x7/Photo 5x7in: "<</PageSize[360 504]/ImagingBBox
>> null/cupsPageSizeName(Photo5x7)>>setpagedevice"
>> ...
>> *CloseUI: *PageSize
>>
>> ...
>>
>> *DefaultImageableArea: LetterDuplex
>> *ImageableArea Letter/Letter 8.5x11in: "18.00 36.00 594.00 783.00"
>> *ImageableArea LetterDuplex/Letter AutoDuplex 8.5x11in: "18.00 27.00
>> 594.00 747.00"
>> *ImageableArea A4/A4 210x297mm: "10.00 36.00 585.00 833.00"
>> *ImageableArea A4Duplex/A4 AutoDuplex 210x297mm: "10.00 27.00
>> 585.00 797.00"
>> *ImageableArea Legal/Legal 8.5x14in: "18.00 36.00 594.00 999.00"
>> *ImageableArea Photo/Photo 4x6in: "9.00 9.00 279.00 423.00"
>> *ImageableArea PhotoFullbleed/Photo 4x6in: "0.00 0.00 288.00 432.00"
>> *ImageableArea Photo5x7/Photo 5x7in: "9.00 36.00 351.00 495.00"
>> ...
>>
>>
>> This should work.
>>
>> Till
prev parent reply other threads:[~2009-05-20 23:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 19:28 [Printing-architecture] Fixes and changes on the "cups" output device of Ghostscript -Please Test! Till Kamppeter
2009-04-30 11:45 ` Till Kamppeter
2009-05-04 11:17 ` Till Kamppeter
[not found] ` <DD6046532A44F047ACD45225E9D737B14A3FB6653D@GVW1155EXB.americas.hpqcorp.net>
2009-05-04 16:28 ` Till Kamppeter
[not found] ` <DD6046532A44F047ACD45225E9D737B14A40FFAF0E@GVW1155EXB.americas.hpqcorp.net>
2009-05-19 18:44 ` Till Kamppeter
[not found] ` <DD6046532A44F047ACD45225E9D737B14A40FFAF11@GVW1155EXB.americas.hpqcorp.net>
2009-05-19 21:36 ` Till Kamppeter
2009-05-20 23:03 ` Till Kamppeter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A148C35.8050704@gmail.com \
--to=till.kamppeter@gmail.com \
--cc=david.suffield@hp.com \
--cc=gs-devel@ghostscript.com \
--cc=mike@easysw.com \
--cc=printing-architecture@lists.linux-foundation.org \
--cc=raghothama.cauligi@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.