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#]
using Spire.Pdf;


namespace PDFtoPS
{
    class Program
    {
        static void Main(string[] args)
        {
            //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]
Imports Spire.Pdf


Namespace PDFtoPS
	Class Program
		Private Shared Sub Main(args As String())
			'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)
		End Sub
	End Class
End Namespace

Output

Convert PDF to PostScript in C#, VB.NET