Convert PDF to PostScript in C#, VB.NET

A PostScript (.PS) file is an image saved in the PostScript page description language. The PostScript file format is widely used by publishers primarily for printing purposes. This article will show you how we can easily convert PDF to PostScript by using Sprie.PDF with C# and VB.NET.

Below is the screenshot of the input PDF file.

Convert PDF to PostScript in C#, VB.NET

Full Code

[C#]
//create a PdfDocument instance
PdfDocument document = new PdfDocument();

//load a sample PDF file
document.LoadFromFile(@"C:\Users\Administrator\Desktop\Introduction.pdf");

//save as .ps file
document.SaveToFile("toPostScript.ps", FileFormat.POSTSCRIPT);
[VB.NET]
'create a PdfDocument instance
Dim document As PdfDocument =  New PdfDocument() 
 
'load a sample PDF file
document.LoadFromFile("C:\Users\Administrator\Desktop\Introduction.pdf")
 
'save as .ps file
document.SaveToFile("toPostScript.ps", FileFormat.POSTSCRIPT)

Output

Convert PDF to PostScript in C#, VB.NET