Search code examples
.netpdfacrobatpostscript

How do I use AIC to load a PDF file and output Postscript on a Windows 2008 machine?


How do I write code using AIC (Acrobat Interapplication Communication) to load a PDF file and output the equivalent Postscript file? Using Acrobat X interactively, I would open the file, then use the menu File > Save As... > More Options... > PostScript.

Ideally, I would like to do this from a Windows Service program without displaying any window on the machine console.

I have installed Acrobat X Pro and I have downloaded the Acrobat SDK.

I'd prefer code samples in C#, but I can convert from VB or C++ if needed.


Solution

  • For the latest version of Ghostscript (which is v9.02), a suitable commandline would be:

    gswin32c.exe ^
      -o output.ps ^
      -sDEVICE=ps2write ^
       input.pdf