Question:Hello, I have an requirement to convert PostScript to PDF file in windows application using c# using your application is it possible,if it possible can you send me sample code. Thanks Regards, hoping find solution on VeryDOC?
Answer: When you need to convert PostScript to PDF from C#, maybe you can have a free trial of this software: VeryDOC Postscript to PDF Converter, which is Windows based application supporting both 32-bit and 64-bit. This converter is available via an easily integrated COM object (or DLL Library, or Command Line), enabling developers to access the converter via any programming or scripting languages, such as Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc. Using the COM object (or DLL Library, or Command Line), file conversions can be done consecutively or simultaneously. Please check more information of this software on homepage, in the following part, I will show you how to use this software.
- By the SDK version, you can call this software for convert PostScript to PDF from C# much more easily.
- When downloading finishes, there will be a zip file. You need to extract it to some folder then you can call it from C# normally.
Step 2. Converting PostScript to PDF from C#.
- When use this software, please refer to the usage and example in the extracted folder carefully.
- Here is the usage for your reference: ps2pdf.exe [options] [Options] <PS file> [PDF file]
- Here are some parameters for your reference:
- When you need to call it from C#, please refer to the following code template:
-firstpage <int> : First page to print, from 1 to max page
-lastpage <int> : Last page to print, from 1 to max page
-producer <string> : Set 'producer' to PDF file
-creator <string> : Set 'creator' to PDF file
-subject <string> : Set 'subject' to PDF file
-rotate <int> : Rotate pages, 90, 180, 270
-noempty : Delete empty pages from PDF file
-mergepdf <string> : Merge two PDF files into one PDF file
-mergepdf <file1|file2|file3|...>: Merge several PDF files into one
-burstpdf <string> : Burst PDF file into single page PDF files
static void Main(string args)
Process proc = new Process();
proc.StartInfo.FileName = @"C:\\ps2pdf.exe";
string strArguments = "";
strArguments += "-burstpdf";
strArguments += " D:\\temp\\sample.ps D:\\temp\\out.pdf";
proc.StartInfo.Arguments = @strArguments;
By this method, we can convert PostScript to PDF from C# easily. During the using, if you have any question, please contact us as soon as possible.