Ghostscript doesn't keep landscape page orientation

淺唱寂寞╮ 提交于 2019-12-12 19:15:02

问题


Example: Create a one sheet landscape PDF from Excel. Open it using Adobe Reader, where it opens as landscape. Print it using Ghostscript. Open printout using Adobe Reader, and it should still be landscape, but it isn't.

This issues happens whether or not the source is a PDF or Excel itself. I use a PDF source in the example because I figured that it would be easier to illustrate the issue.

I know it can probably be forced to be printed using landscape. What I don't understand is why Ghostscript is not using the orientation of the original document. How can I get Ghostscript to keep the orientation of the original document?

PDFWrite config file:

-I"C:\Program Files\gs\gs9.22\lib";"C:\Program Files\gs\fonts" -sDEVICE=pdfwrite -r300 -dNOPAUSE -dSAFER -sPAPERSIZE=A4 -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress

Redmon config:

@"C:\Program Files\gs\pdfwrite.txt" -sOutputFile="%1" -c 30000000 setvmthreshold .setpdfwrite -f -

Printer driver:

Ghostscript PDF


回答1:


You've left the AutoRotatePages switch at the default. The default is to rotate pages so that the majority of text is horizontal, if you don't want that, then set -dAutoRotatePages=/None.

Since you apparently already have a PDF file ? Why use Ghostscript to create another one ? You stand the chance of losing stuff that way.

Since the input is PDF there is no point in the -sPAPERSIZE switch, since that only sets the dfefault media, which is immediately overridden by the PDF interpreter.

If I were you I wouldn't set -dPDFSETTINGS at all, nor -r300 (the resolution setting is mostly pointless for pdfwrite)



来源:https://stackoverflow.com/questions/47865033/ghostscript-doesnt-keep-landscape-page-orientation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!