diff options
author | Henry Stiles <henry.stiles@artifex.com> | 2012-03-03 11:03:53 -0700 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2012-03-15 11:54:24 +0000 |
commit | 33f73d55002201962b3c012a3e494a3d37c7d9c2 (patch) | |
tree | 0c6ed365e13f05e929be3ff8dda0b9947897a831 | |
parent | f3f4d9bb05fc6c7951e2df937035fa6092947b75 (diff) |
Fixes bug 692894, orientation of pcl pages incorrect.
This is a case of the current code emulating undocumented behavior
incorrectly. It appears the HP printers resets the print direction
upon receiving a new page size command. Previously we tried to emulate
this by not resetting the logical page orientation which is incorrect
but happened to print the tests we had correctly.
-rw-r--r-- | pcl/pcpage.c | 14 | ||||
-rw-r--r-- | pcl/pcstate.h | 3 |
2 files changed, 3 insertions, 14 deletions
diff --git a/pcl/pcpage.c b/pcl/pcpage.c index c9e6e34d0..e59d04407 100644 --- a/pcl/pcpage.c +++ b/pcl/pcpage.c @@ -590,8 +590,6 @@ pcl_end_page( code = (*pcs->end_page)(pcs, pcs->num_copies, true); if ( code < 0 ) return code; - /* allow the logical orientation command to be used again */ - pcs->orientation_set = false; if ( pcs->end_page == pcl_end_page_top ) code = gs_erasepage(pcs->pgs); @@ -658,13 +656,8 @@ set_page_size( } } if ((psize != 0) && ((code = pcl_end_page_if_marked(pcs)) >= 0)) { - /* if the orientation flag is not set for this page we select - a portrait page using the set paper size. Otherwise select - the paper using the current orientation. */ - if ( pcs->orientation_set == false ) - new_logical_page(pcs, 0, psize, false, false); - else - new_page_size(pcs, psize, false, false); + pcs->xfm_state.print_dir = 0; + new_page_size(pcs, psize, false, false); } return code; } @@ -759,7 +752,6 @@ set_logical_page_orientation( /* If orientation is same as before ignore the command */ if ( i == pcs->xfm_state.lp_orient ) { - pcs->orientation_set = true; return 0; } @@ -770,7 +762,6 @@ set_logical_page_orientation( pcs->hmi_cp = HMI_DEFAULT; pcs->vmi_cp = VMI_DEFAULT; new_logical_page(pcs, i, pcs->xfm_state.paper_size, false, false); - pcs->orientation_set = true; } return code; } @@ -1324,7 +1315,6 @@ pcpage_do_reset( } if ((type & (pcl_reset_initial | pcl_reset_printer)) != 0) { - pcs->orientation_set = false; pcs->paper_source = 0; /* ??? */ pcs->xfm_state.left_offset_cp = 0.0; pcs->xfm_state.top_offset_cp = 0.0; diff --git a/pcl/pcstate.h b/pcl/pcstate.h index 25760c58e..e2be72439 100644 --- a/pcl/pcstate.h +++ b/pcl/pcstate.h @@ -148,8 +148,7 @@ struct pcl_state_s { int perforation_skip; pcl_margins_t margins; /* relative to print_direction */ pcl_xfm_state_t xfm_state; - bool orientation_set; /* the orientation command can - only be set once per page */ + /* Chapter 6 (pcursor.c) */ coord hmi_cp; coord vmi_cp; |