结合打印作业研究。净 [英] Combining print jobs in . NET

查看:183
本文介绍了结合打印作业研究。净的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(短版的结尾)

我目前正在开发,需要跟踪的MS Office文件的任意数,并且现在的软件需要提供的功能来打印所有这些文件,一起一些应用程序数据(可能被发送到打印机类型.xps的文件,.html或.txt)中。一个打印每一个文件一个是相当微不足道的,但结果是为每个单独的打印作业。这是在设置在办公室,在与所述打印作业的用户名和时间每个打印作业的开始打印的片材的打印机的情况下很糟糕,而且它可以允许其他用户共享打印机的作业之间进行打印。 另外,会有的作业没有处理,按正确的顺序的可能性? 1

The software I'm currently developing is required to track an arbitrary number of MS Office files, and now needs to provide the functionality to print all of those files together, along with some application data (likely to be sent to the printer as a file of type .xps, .html, or .txt). Printing each file one by one is fairly trivial, but results in separate print jobs for each of them. This is very bad in the case of printers set up in an office to print a sheet at the beginning of each print job with the username and time of the print job, and it could allow other users sharing the printer to print between the jobs. Additionally, would there be the possibility that the jobs are not processed in the proper order?1

有没有什么办法可以任意集合Office文档合并为一个单一的打印作业?

Is there any way to combine an arbitrary collection of Office documents as a single print job?

编辑:另一种解决方案是可以接受的一种方法,所有的文档合并到一个单一的PDF / XPS(或类似)的文件?这样既能实现的首要目标,并启用未来份更快的印刷,因为我们可以打印一个大的文件,而不是每个单独的文件(当然,直到一个新的文件被添加)。

An alternative solution that would be acceptable is a way to combine all of the documents to a single pdf/xps (or similar) document? This would both accomplish the primary goal, and enable quicker printing of future copies, as we could print that one large document instead of each individual document (until, of course, a new document is added).

1 (原帖后编辑)

考虑:

  • 的MS Office文件乱收(名为.doc [X],.xls的[X],.PPT [X])
  • 在应用程序数据(生成的字符串,可以打印为.txt或.html等)

Acheive:

  • 打印所有文件作为一个单独的打印作业,或者通过组合到一个作业,或者合并到一个文件打印之前。

问:
能不能做到?如果是这样,怎么样?

Question:
Can it be done? If so, how?

推荐答案

是 - 如果你将所有的内容转换成PDF,加入这些PDF文件到一个...

Yes - if you convert all content into PDFs and join those PDFs into one...

有一些图书馆在那里实现这一点 - 但如果你想要覆盖所有Office格式,你可能需要考虑的的Aspose.Total .NET (不属于,只是一个快乐的客户)......

There are some libraries out there to achieve this - but if you want to cover all office formats you might need to consider Aspose.Total .NET (not affiliated, just a happy customer)...

修改 - 按照注释:

另一种选择(尤其是因为该软件本质上是一个桌面应用程序和的 http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2 不大多适用)是使用Office互操作来创建PDF文件。文字可以(通过使用Office互操作性/​​ Word和创建带有文本的中介Word文档为例)被转换为PDF比较容易。

Another option (esp. since the software is essentially a "desktop app" and http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2 does not apply mostly) is to use Office Interop to create PDF files. Text can be converted to PDF rather easily (for example by using Office Interop/Word and creating an intermediary Word document with that text).

总之这使得大部分功能要求......以确保没有其他打印作业COM其间人们可以合并的PDF文件合并成一个PDF和打印的......对于合并的PDF文件有几个库(免费喜欢Ghostscript的,商业的像的Gnostice PDFOne)在那里 - 有些甚至允许建立从文字/图片的PDF文件避免上面提到的中介Word文档)的

Altogether this allows for most of the functionality asked... to make sure that no other print jobs com inbetween one could merge the PDF files into one PDF and print that... for merging PDFs there are several libraries (free like Ghostscript, commercial like Gnostice PDFOne) out there - some even allow the creation of PDFs from text/images avoiding the intermediary Word document mentioned above).

这篇关于结合打印作业研究。净的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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