diff options
author | Henry Stiles <henry.stiles@artifex.com> | 1999-09-16 06:02:35 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 1999-09-16 06:02:35 +0000 |
commit | a99ab121aea7df57d5fdfb21291159a7c741a6c9 (patch) | |
tree | 7d8374ce7d89b79f3c1da1073541345f2a0b24ae /pcl/pcjob.c | |
parent | 0ffe278f66b9aa64f34e593acbf337a61ee81675 (diff) |
Proper "page feed if marked" logic for duplexing commands.
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@952 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'pcl/pcjob.c')
-rw-r--r-- | pcl/pcjob.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/pcl/pcjob.c b/pcl/pcjob.c index d88076073..6fe7f037f 100644 --- a/pcl/pcjob.c +++ b/pcl/pcjob.c @@ -53,6 +53,12 @@ pcl_simplex_duplex_print(pcl_args_t *pargs, pcl_state_t *pcs) { int code; bool reopen = false; + /* oddly the command goes to the next page irrespective of + arguments */ + code = pcl_end_page_if_marked(pcs); + if ( code < 0 ) + return code; + pcl_home_cursor(pcs); switch ( int_arg(pargs) ) { case 0: @@ -104,13 +110,16 @@ pcl_duplex_page_side_select(pcl_args_t *pargs, pcl_state_t *pcs) { uint i = uint_arg(pargs); int code; - if ( i > 2 ) - return 0; - /* According to H-P documentation, this command ejects the page */ - /* even if nothing has been printed on it. */ + /* oddly the command goes to the next page irrespective of + arguments */ code = pcl_end_page_if_marked(pcs); if ( code < 0 ) - return code; + return code; + pcl_home_cursor(pcs); + + if ( i > 2 ) + return 0; + if ( i > 0 && pcs->duplex ) put_param1_bool(pcs, "FirstSide", i == 1); return 0; |