Bug 688994 - Landscape printing problem
Summary: Landscape printing problem
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: 8.54
Hardware: PC Windows XP
: P4 enhancement
Assignee: Ray Johnston
QA Contact: Bug traffic
URL:
Keywords: bountiable
Depends on:
Blocks:
 
Reported: 2006-11-13 08:40 UTC by Francois Donnay
Modified: 2013-06-26 19:34 UTC (History)
4 users (show)

See Also:
Customer:
Word Size: ---


Attachments
Test File (test.pdf) (11.19 KB, application/pdf)
2006-11-15 06:38 UTC, Francois Donnay
Details
Ghostscript Result (13.79 KB, application/postscript)
2006-11-15 06:39 UTC, Francois Donnay
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Donnay 2006-11-13 08:40:15 UTC
This ghostscript option rotate A4 landscape pages before printing them on A4 
portrait.

-c "<< /Policies << /PageSize 3 >> /PageSize [595 842] /InputAttributes 
currentpagedevice /InputAttributes get mark exch {1 index /Priority eq not 
{pop << /PageSize [595 842] >>} if } forall >> >> setpagedevice"

The A3 landscape pages are shrinking on A4 portrait but the A3 landscape pages 
are not rotate before printing.

Have you an idea to track a solution for this problem?


Thanks for your Help,
Francois.
Comment 1 Hin-Tak Leung 2006-11-14 15:46:51 UTC
example ps files please.

This line in the report looks wrong:

"The A3 landscape pages are shrinking on A4 portrait but the A3 landscape pages 
are not rotate before printing."

(ghostscript does not normally shrink input files - also, 
"/PageSize [595 842]" is A4, so if you run your "rotation code" as you wrote 
it, A3 page probably will be *clip* to A4? unless your print job has special
postscript code to detects page size and resize. another reason for a example ps
file)
 
Comment 2 Francois Donnay 2006-11-15 06:37:38 UTC
When I use this command line to convert the file “test.pdf” in Postscript:

gswin32c -sOutputFile="test.ps" -I="C:\Program Files\gs\fonts" -
sDEVICE=pswrite -c "<< /Policies << /PageSize 3 >> /PageSize [595 
842] /InputAttributes currentpagedevice /InputAttributes get mark exch {1 
index /Priority eq not {pop << /PageSize [595 842] >>} if } forall >> >> 
setpagedevice" -dNOPAUSE -dBATCH  test.pdf

The first Pages are being rotated, but the second page are not being rotated.
Comment 3 Francois Donnay 2006-11-15 06:38:22 UTC
Created attachment 2613 [details]
Test File (test.pdf)
Comment 4 Francois Donnay 2006-11-15 06:39:06 UTC
Created attachment 2614 [details]
Ghostscript Result
Comment 5 Francois Donnay 2006-11-20 11:41:50 UTC
Do you need any additional information?

I agree that it is not rely a bug, but it is a real problem for us...

I have searching for a solution on many forums and it seems that I am not alone 
with this problem.

If you find a solution to this problem, it seems very interesting to include it 
to the Ghostscript documentation.

Thanks for your help!!!
Francois
Comment 6 SaGS 2006-11-24 04:57:17 UTC
There may be a workaround, if the real need is to suppress the overscaling of 
page 2 (as opposed to actually wanting portrait pages with the text written 
vertically): "-sPAPERSIZE=a4 -dPDFFitPage". The difference is that both pages 
appear in landscape (as they are in the PDF).

"-dPDFFitPage" has its own problems. I fixed the ones I found when I created 
the suggested implementation for UserUnit, attachment #2419 [details] (from bug #688124 
comment #12, details in bug #688124 comment #8).
Comment 7 Francois Donnay 2006-11-24 12:32:52 UTC
The real need is to have an option that rotates the landscape pages. 

This option would be used in combination of the "-dPDFFitPage" option.

Thanks for your suggestion...
Comment 8 Francois Donnay 2007-02-06 03:32:19 UTC
This option would be very interesting to print PDF files that contain several 
page formats and orientations with a printer that only can print A4 pages.
Comment 9 Shailesh Mistry 2011-07-19 19:37:40 UTC
Enhancement still missing in Ghostscript 9.03
Comment 10 Ray Johnston 2012-09-09 17:37:22 UTC
Change to ASSIGNED. I will retest this since PDFFitPage seems to auto-rotate
to 'best fit' for me.
Comment 11 Ray Johnston 2013-06-26 19:34:32 UTC
This was caused by an /Orientation 0 in pdf_main.ps, but that is not a
problem if an alternate (and considerably simpler) command line option is
used for page fitting. This new feature works with PS as well as PDF input
files:

gs -dFitPage -sPAPERSIZE=a4 -dFIXEDMEDIA Bug688994.pdf