pdfSharp printing with page size

Deadly 提交于 2019-12-05 09:06:01

问题


I am using PdfSharp dll to print a pdf. This is the code that i am using. This works fine for me.

PdfFilePrinter.AdobeReaderPath = "C:\\Program Files\\Adobe\\Reader 9.0\\Reader\\AcroRd32.exe";
PdfFilePrinter printer = new PdfFilePrinter("C:\\sample.pdf", "HP LaserJet P1007");
printer.Print();

As always!!!! "BUT" I am not able to apply page size like A4 to the above code. So is there any way that i can implement page size to the code here.

Thanks in advance


回答1:


PdfFilePrinter launches AcroRd32.exe and passes file name and printer name in the command line. I'm afraid the command line does not support selection of paper format or other advanced options.



来源:https://stackoverflow.com/questions/6277554/pdfsharp-printing-with-page-size

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