Combine print jobs. NETWORK

(short version at the end)

The software that I am currently developing is required to track an arbitrary number of MS Office files and now it is necessary to provide functionality for printing all these files along with some application data (which can be sent to the printer as a file of the type .xps, .html or. txt). Printing each file one at a time is pretty trivial, but leads to separate print jobs for each of them. This is very bad if printers are configured in the office to print a sheet at the beginning of each print job with the username and time of the print job, and this allows other users sharing the printer to print between jobs. Also, is it likely that jobs will not be processed in the correct order? 1

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

EDIT: An alternative solution that would be acceptable is a way to combine all documents with one pdf / xps document (or similar)? This will ensure both the achievement of the main goal and the faster printing of future copies, since we can print this one large document instead of each individual document (until a new document is added).

1 (Edited after the original post)

Short version

Given:

  • Custom MS Office file collection (.doc [x],. Xls [x] ,. ppt [x])
  • Application data (a string is generated, can be printed on .txt, .html, etc.)

getting perfect:

  • Print all files as a single print job, either by combining one job, or combining it into one file before printing.

Question:
It can be done? If so, how?

+4
source share
1 answer

Yes - if you convert all contents to PDF files and attach these PDF files to one ...

There are several libraries for this, but if you want to cover all office formats, you may need to consider Aspose.Total.NET (not an affiliate, just a happy client) ...

EDIT - according to the comments:

Another option (especially because the software is essentially a “desktop application” and http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2 is mostly not used) is to use Office Interaction to create PDF files. Text can be easily converted to PDF (for example, using Office Interop / Word and creating an intermediate Word document with this text).

In general, this allows you to use most of the functions ... to make sure that no other print jobs between them can combine PDF files into one PDF file and print it ... there are several libraries available for merging PDF files (free, like Ghostscript, commercial such as Gnostice PDFOne), some of them even allow you to create PDF files from text / images, avoiding the Word intermediate document mentioned above).

+1
source

All Articles