本文介绍了在LANDSCAPE中使用GhostScript打印PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在打印PDF文件,如下所示:

I am printing a PDF file as follows:

using (GhostscriptProcessor processor = new GhostscriptProcessor())
{
    List<string> switches = new List<string>();
    switches.Add("-empty");
    switches.Add("-dPrinted");
    switches.Add("-dBATCH");
    switches.Add("-dNOPAUSE");
    switches.Add("-dNOSAFER");
    switches.Add("-dNumCopies=1");
    switches.Add("-sDEVICE=mswinpr2");
    switches.Add("-sOutputFile=%printer%" + printerName);
    switches.Add("-f");
    switches.Add(inputFile);
    processor.StartProcessing(switches.ToArray(), null);
}

它工作得很漂亮,但是我在那里遇到了问题.我无法(并且确实尝试过)以横向打印任何PDF文件.我尝试使用方向"和调整大小"来更改打印机的系统首选项.我所做的一切都是无济于事的,因为它总是以纵向打印.

It works beautifully but I have a problem there. I can't (and really tried) print any PDF file in landscape. I tries with Orientation, with resize, changing the system preferences of the printer. Anything I do is for nothing because it is always printed in portrait.

有什么想法吗?

推荐答案

您要解决什么问题?如果您不是要让打印机在横向介质上打印,那不是默认设置,那么mswinpr2设备将无法工作,因此无法更改纸盘选择.

What problem are you trying to solve ? If you are trying to get the printer to print on landscape media, and that isn't its default, then its not going to work the mswinpr2 device can't change the tray selection.

这篇关于在LANDSCAPE中使用GhostScript打印PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 08:39