tags:

views:

59

answers:

2

Our customer has tens of thousands of correspondence letters in Word 2007 format. They need to combine all the letters into a single large PCL file, which is then sent to the print vendor for bulk printing.

From what i understand PCL content is generated by a specific printer driver. So whether interactively or programmatically with VBA from the Document.PrintOut() function, when called to print to file, it passes content to the selected/default printer driver to output the PCL format.

Now, they have an existing .NET 1.1 batch job that generates PDF out from those Word documents. They wish to use the same batch job to combine them into that large PCL file. If a printer driver is involved in the process, how can multiple Word docs be programmatically "printed" to the same file?

A: 
pipitas
well it is really thousands to tens of thousands of files.
icelava
In that case, the second method should work: you have to build the final file through various intermediate steps, where you concatenate 100 PDFs first with the help of `pdftk.exe`, before the final filemerge towards THEBIG.pdf which you then convert to PCL.
pipitas
A: 

I agree with pipitas that a workable solution of the existing process could work well. Depending on how they are saving to Word format, you could improve that by using the 'save as' function programmability to save as PDF format.

I'd put my code inline but it's a bit of a mess, simply search Google for Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF and you should see lots of examples of this.

Another thought more in line with your request, is to setup a generic PCL printer driver (HP LaserJet 4000 or similar) and programmability open each document and print to the default printer. The trick is to write those to a file. This can be done in a couple of manners.

Use Redmon or something similar to allow for output to file without any user intervention. We have a tool that works on XP, 2003 that allows for appending to file that we have used in a very similar instance where we need to concatenate 9000 print jobs a day together (I can send a link if it interests you).

The other is to use or write a quick capture tool that captures data on port 9100 (or 515 for LPR) and writes that data to file. The application becomes the printer and away you go.

Add a comment if you want any code for the items mentioned and I can paste them in.

Douglas Anderson