Bug 687330 - Wrong Orientation after convert from PDF to PCL
Summary: Wrong Orientation after convert from PDF to PCL
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Printer Driver (show other bugs)
Version: 8.11
Hardware: PC Windows 2000
: P2 normal
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-29 12:19 UTC by Elmar Todt
Modified: 2007-12-13 12:55 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Example of a landscape PDF. (4.39 KB, application/pdf)
2004-03-04 00:12 UTC, Elmar Todt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elmar Todt 2004-02-29 12:19:11 UTC
Hello,
i have a problem to convert a pdf-document in a pcl-file.
I use following commandline:
gswin32 -dNOPAUSE -sDEVICE=laserjet -sOutputFile=filename.pcl filename.pdf

After the converting A4 landscape PDF´s to PCL, the PCL format is A3 and 
portrait. Not A4 landscape, like the original PDF-File!
Why?
Comment 1 Jack Moffitt 2004-03-03 08:43:50 UTC
Please attach a sample file if you would like us to investigate this report.
Comment 2 Elmar Todt 2004-03-04 00:12:42 UTC
Created attachment 527 [details]
Example of a landscape PDF.
Comment 3 Elmar Todt 2004-03-04 00:16:39 UTC
Sorry, the pageformat after converting is not A3 portrait rather A4 portrait!
Comment 4 Ray Johnston 2004-03-17 07:46:50 UTC
This is a duplicate of bug 629335 which was recently fixed.

The problem is that Ghostscript has a special InputAttributes entry
for a PageSize that fits ANY page size without rotation. This is
a four element array (rather than the standard two element PageSize
array) that represents a range.

When generating data for a particular printer, what should really
be done is to set up an InputAttributes dictionary for the page
sizes that the printer actually supports, but now that all the
standard page sizes are pre-defined in the InputAttributes dict,
it may be enough to just operate without the 'range' type PageSize.

I provided a patch to add a -dNORANGEPAGESIZE option (following)
that prevents the default InputAttributes from including the range
PageSize entry. This should resolve the issue.

________________________________________________________________________
diff -c -r1.20 gs_setpd.ps
*** lib/gs_setpd.ps     17 Dec 2003 09:12:03 -0000      1.20
--- lib/gs_setpd.ps     18 Feb 2004 16:22:37 -0000
***************
*** 200,210 ****
        % see note above about pagetype executable array contents.
        load dup 0 get exch 1 get 2 array astore .dicttomark
      } forall
!     % Add one last entry which is the 4 element range array (non-standard)
!     counttomark 2 idiv
        % PageSize with either dimension 0 will be detected in
        % match_page_size, so we can allow it here
!     mark /PageSize [0 dup 16#7ffff dup] .dicttomark
      .dicttomark
    }
    (%MediaSource) 0
--- 200,214 ----
        % see note above about pagetype executable array contents.
        load dup 0 get exch 1 get 2 array astore .dicttomark
      } forall
!     % If NORANGEPAGESIZE is defined, (-dNORANGEPAGESIZE), then don't add
!     % the 'match any' PageSize entry
!     systemdict /NORANGEPAGESIZE known not {
!       % Add one last entry which is the 4 element range array (non-standard)
!       counttomark 2 idiv
        % PageSize with either dimension 0 will be detected in
        % match_page_size, so we can allow it here
!       mark /PageSize [0 dup 16#7ffff dup] .dicttomark
!     } if
      .dicttomark
    }
    (%MediaSource) 0

Comment 5 Elmar Todt 2004-03-19 01:35:18 UTC
Thanx for the patch.
It runs...