c# - Print PDF using GhostScript in LANDSCAPE -
i printing pdf file 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); }
it works beautifully have problem there. can't (and tried) print pdf file in landscape. tries orientation, resize, changing system preferences of printer. nothing because printed in portrait.
any ideas?
what problem trying solve ? if trying printer print on landscape media, , isn't default, not going work mswinpr2 device can't change tray selection.
you need to add switches.Add("-dFIXEDMEDIA");
ReplyDelete