[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BUG & FIX : Tray selection for PCL 4/5 does not work... fixed in Artife
From: |
jason totten |
Subject: |
BUG & FIX : Tray selection for PCL 4/5 does not work... fixed in Artifex branch... |
Date: |
Thu, 29 Jan 2009 16:05:24 -0500 |
Hi -
I ran across a problem creating PCL files from PDF and the %MediaSource
parameter not working correctly. After fixing the problem locally, I finally
stumbled across the bug at Artifex (
http://bugs.ghostscript.com/show_bug.cgi?id=690182) which has a slightly
less complete solution. The parameter is changed from -d%MediaSource (which
I think is ignored anyway) to -dMediaPosition (which is what it is referred
to in the code as anyway) and it works. The only thing I might check is any
other options that are required if tray "6" is selected.
I'm attaching my changes (rough line numbers) below.
Thanks -
Jason R. Totten
-----------
::gdevdjet.c
~316
{
gx_device_hpjet *dev = (gx_device_hpjet *)pdev;
int paper_source = -1;
- int paper_source_tab[] = { 5, 1 };
+ int paper_valid_trays[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 };
if (dev->ManualFeed_set && dev->ManualFeed) paper_source = 2;
- else if (dev->MediaPosition_set && dev->MediaPosition >= 0 &&
- dev->MediaPosition < countof(paper_source_tab))
- paper_source = paper_source_tab[dev->MediaPosition];
+ else if (dev->MediaPosition_set && dev->MediaPosition >= 0 ){
+ int i;
+ for (i = 0; i < countof(paper_valid_trays); i++){
+ if (dev->MediaPosition == paper_valid_trays[i]){
+ paper_source = dev->MediaPosition;
+ break;
+ }
+ }
+ }
if (paper_source >= 0)
sprintf(buf, "%s\033&l%dH", str, paper_source);
else
~549
{
code = param_write_bool(plist, "ManualFeed", &dev->ManualFeed);
}
+ if (code >= 0)
+ {
+ code = param_write_int(plist, "MediaPosition", &dev->MediaPosition);
+ }
if (code >=0)
code = param_write_bool(plist, "Tumble", &dev->Tumble);
return code;
~568
code = param_read_bool(plist, "ManualFeed", &ManualFeed);
if (code == 0) ManualFeed_set = true;
if (code >= 0) {
- code = param_read_int(plist, "%MediaSource", &MediaPosition);
+ code = param_read_int(plist, "MediaPosition", &MediaPosition);
if (code == 0) MediaPosition_set = true;
else if (code < 0) {
- if (param_read_null(plist, "%MediaSource") == 0) {
+ if (param_read_null(plist, "MediaPosition") == 0) {
code = 0;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- BUG & FIX : Tray selection for PCL 4/5 does not work... fixed in Artifex branch...,
jason totten <=