views:

76

answers:

2

I've discovered multiple options for convert a few to serveral PDFs into Postscript, but many are command-line programs with command-line limitations (this application lives on .NET).

Our application generates tens-of-thousands of PDFs that we need to send to a printer, except BEFORE the Postscript is printed we need to edit the Postscript to insert print command instructions (duplex, tray-pulls, highlight color, etc.)

I think a perfect solution might allow us to write the PDFs to a stream, and simultaneously allow us to read the output stream so we may edit the Postscript before writing it to a file.

Of course, if I must create the file first containing all 10,000 PDFs and edit it in an additional pass, I'm OK with that, too.

I should mention that speed is important. I need to print 10,000 at a time, but need to keep the printers busy 24-hours/day.

A: 

Have you thought of doing something along the lines of GhostscriptSharp? That is, using P/Invoke to call functions in the Ghostscript DLL?

Matthew Talbert
According to the documentation, "The GhostscriptWrapper class contains 3 static methods that can be used to generate jpg images from a PDF file." I needed Postscript output so we might edit it to insert finishing commands.
tggagne
Of course, if you're suggesting we could just call the dll functions ourselves, like GhostscriptSharp does, that we did entertain for a while. Unfortunately, the client seemed a little shy of open-source solutions so (if you can believe this) the next best product cost $600 and was supported from the other side of the planet.
tggagne
Yes I realize that GhostscriptSharp didn't contain the functionality you needed. I was suggesting you call the dll functions yourselves.
Matthew Talbert
+1  A: 

You mention in some comments that there's a $600 client that may have the functionality that you're looking for. At the risk of being downvoted, is developing the process you describe from scratch really worth saving $600? That's only a couple of days' worth of salary, and if it lets you get started, it may be the way to go.

To answer the question directly, I'd probably end up going the way of calling the DLL directly to do it, as Matthew suggests.

rwmnau
That is what we ended up doing, more or less.It turns out the $600 client was basically wrapping pdftops, or at least, that's what the output looked like. We recommended to our client that they purchase the license and move forward.
tggagne