Search code examples
c#pdfprintingpostscript

Generate a PDF File from a postscript document in c#


Possible Duplicate:
itextsharp postscript to PDF

For an application, I receive a postscript file from an application. This postscript file is sent to our application, and we have to generate a pdf from it for end users.

What is the fastest way to do it? Is there a library(free or not) which does the job? Or some classes in c# which can do this?

We have to do this only in the code, so no "print and choose a pdf printer".

This has to work in our c# application.

Any idea?

Thank you!


Solution

  • You will need a PostScript interpreter if you are receiving PostScript, there is no alternative. You also need one which is capable of emitting a PDF file as output instead of a bitmap.

    The only Open Source PostScript interpreter still in existence at the moment, as far as I know, is Ghostscript which is licenced under GPL. You would have to determine whether that licence is usable by you.

    Failing that there are several commercial alternatives. Ghostscript is also licenced commercially, and there are products from Global Graphics and Adobe.