开发者

Bulk Printing from application in .net?

开发者 https://www.devze.com 2022-12-20 19:49 出处:网络
I\'m working on a project for my companies intranet which requires that multiple attached documents to the main DTO of the project need to be autoprinted in the background. The problem is it\'s a web

I'm working on a project for my companies intranet which requires that multiple attached documents to the main DTO of the project need to be autoprinted in the background. The problem is it's a web project and I want the printing to be done under the surface. Now because it's on an intranet only 开发者_Go百科certain people can use it and I can set a communal printer in the background but I'm wondering hwo to actually print under the surface, the attachments could be anything from photocopy gifs/jpegs to pdf/word docs. Should I use the PrintDocument class? Not really sure how to implement this one. Cheers for any help


I couldn't find a way to do it under the hood as such so what I did instead was to write a class that merges all the files together into one pdf using OpenOfficePortable and then returned this bulk-print pdf to user via a file stream. For anyone interested here is an article that'll help you get started, it will convert rtf, doc, docx files to pdf. Then use ITextSharp or a similar pdf library to merge the files and return it. Pm me if you're attempting this and having trouble.

0

精彩评论

暂无评论...
验证码 换一张
取 消