PrintTicket问题 [英] PrintTicket question

查看:526
本文介绍了PrintTicket问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我对.net 3.5框架中System.Printing的使用有疑问。

I have a question regarding the usage of System.Printing in .net 3.5 framework.

我们是从很长一段时间尝试将作业级别的主要属性设置为打印机。我们曾经使用gdi +,但不幸的是, 它不允许设置 主食,只有双面打印,整理等等。

We are trying from a long time to set staple property at job level to a printer. We used to use gdi+, but unfortunately  it didn't allow setting  staple, only duplex, collate and so on.

现在,我们正在寻找一种新技术来设置主食,这对我们的客户非常重要。所以,我找到了PrintTicket类。

Now, we are looking for a new technology to allow setting staple, feature very important to our client. So, I found the PrintTicket class.

所以,我使用了msdn示例,我设置了staple和我感兴趣的所有其他属性,但我真的不确定下一步该做什么。我的意思是,我没有找到Print()方法。我发现了一些关于xps的东西,但它似乎非常复杂,与我想要的b
不同。

So, I used msdn examples, I set staple and all other properties I was interested on , but I am really not sure what to do next. I mean, I didn't find a Print() method. I found something about xps but it seems to be really complicated and different from whart I want to do.

 

I需要:

- 将文件发送到打印机(图像文件,pdf,办公室)

- send a document to the printer(image file, pdf, office)

- 以编程方式设置所有属性

- set all properties programatically

- 不使用任何打印对话框(我使用PrintDialog并且它工作正常,但我不允许这样做)

- NOT use any print dialog (I used PrintDialog and it is working fine, but I am not allowed to do that)

 

所以,我的选择是:

1。了解如何使用PrintTicket

1. Find out how to use PrintTicket

2。了解如何设置所有打印机首选项而不真正显示PrintDialog

2. Find out how to set all printer preferences without really displaying PrintDialog

 

请帮助

谢谢,

Daniela

推荐答案

嗨Daniela,

Hi Daniela,

如果您要打印XPS文档,这应该很容易...我建议您阅读文档

"阅读和打印XPS文档"
,它可以为您提供有关使用打印机阅读和打印文档的基础。

this should be easy to do if you're printing XPS-documents... I suggest you to read the document "Reading and Printing XPS Documents" which should give you basisc about reading and printing documents using a printticket.

例如,XpsDocumentWriter / SerializerWriterCollat​​or的write方法为printticket提供了一个参数,同时查看了WritingPrintTicketRequired事件处理程序,您可以在其中提供不同级别的printtickets(job- /文件/页面级别)
即时...

The write-methods of the XpsDocumentWriter/SerializerWriterCollator for example provides a parameter for the printticket, also have a look at the WritingPrintTicketRequired event handler, where you could provide printtickets for different levels (job-/document-/page-level) on-the-fly...

希望这有点帮助,如果你还有问题可以随意问...(c ;

hope this helps a bit, if you still have questions feel free to ask... (c;

来自德国的问候,<
Jo

regards from Germany,
Jo

编辑:如你所愿打印图像文件,pdf和office文档我想你以前要将它们转换为XPS。图像可以很容易转换(例如使用Visuals创建XPS),对于pdf,你需要一个转换器
(我可以推荐pdfTron或Compart中的那个)和Office文档可以通过OLE自动化转换为打印到"Microsoft Xps Document Writer"使用SaveAsXPS插件保存到XPS,可以从Microsoft
免费下载...

as you want to print image files, pdf and office documents I guess you've to convert them to XPS before. Images could be easy converted (create XPS using Visuals for example), for pdf you'll need a converter (I can recommend the one from pdfTron or Compart) and Office documents could be converted by OLE automation either printing to the "Microsoft Xps Document Writer" or saving to XPS with the SaveAsXPS-plugin, which can be downloaded from Microsoft for free...


这篇关于PrintTicket问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆