Printing Pdf from .Net

I recently came across printing crystal reports, and they always were unreliable when it came to printing a huge number of those documents. Even though I implemented my own queue, and processed them one by one, they always tended to fail at System.Drawing.Printing.something
With generally the handle being invalid.

I had a look at Adobe’s own command line printing, but it always brought its windows up, and i could never manage to print in duplex mode, or change certain settings.

I can around a workaround with this, GhostView, and from the same creators comes GhostPrint
a tool called gsprint.exe has a pretty nifty way of telling what you can do, and set the printer, colour, duplex, landscape/portrait with arguments and made it very simple. the fact that this also has a pdf merging tool is fabulous.

The only issue i had was to determine if a document is to be printed in landscape or potrait.
But since i was creating the PDF’s from Crystal Reports, I could determine those details using the ReportDocument class.

gsprint is a part of gsview which can be found at

It has a good documentation and pretty easy to follow.

If you do have any issues do post in a message


Leave a Reply / Comment

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s