简体   繁体   English

c#在多个设置输出中打印PDF?

[英]c# printing PDF in Multiple setting output?

I have a .net application in c# where I'm trying to print using a pdf document on the left side and a text description on the right side. 我在c#中有一个.net应用程序,在其中尝试使用左侧的pdf文档和右侧的文本描述进行打印。 So far I've been successful in combining the 2 outputs into one pdf file, but am stumped on how to programmatically do it so that when I go to print, then in the Page Sizing & Handling section, select "Multiple" and set pages per sheet to 2. 到目前为止,我已经成功地将2个输出合并到一个pdf文件中,但是却对如何以编程方式进行处理感到困惑,以便在我打印时,然后在“页面大小和处理”部分中,选择“多个”并设置页面每张到2。

My guess is it's a process print feature somewhere but can't seem to find any examples nor clear documentation to do so. 我的猜测是这是某个地方的过程打印功能,但似乎找不到任何示例,也找不到清晰的文档来做到这一点。 Please advise, thanks. 请指教,谢谢。

在此处输入图片说明

if you want to set pages per sheet from the backend rather than print/ print dialog you have to use PrintTicket Class [System.Printing]. 如果要从后端而不是打印/打印对话框设置每张纸的页数,则必须使用PrintTicket类[System.Printing]。 this classs have lots of property and events that can allow us to do lots of printing and printing job related stuff using c# code. 此类具有许多属性和事件,这些属性和事件可使我们使用c#代码进行大量与打印有关的工作。 there is also many classes related to printing in this name space[ may you know about the xps in windows when you going to print may you see option print to xps it is belongs to Print Schema class] 在此名称空间中还有许多与打印有关的类[您可能在打印时可能知道Windows中的xps,可能会看到选项print to xps,它属于Print Schema类]

you can read more about it from https://msdn.microsoft.com/en-us/library/system.printing.printticket.aspx 您可以从https://msdn.microsoft.com/en-us/library/system.printing.printticket.aspx了解更多有关它的信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM