Skip to content

Instantly share code, notes, and snippets.

@groupdocs-com-kb
Last active December 20, 2023 17:23
Show Gist options
  • Save groupdocs-com-kb/a179d5e20f79ced21fe240180059cc6a to your computer and use it in GitHub Desktop.
Save groupdocs-com-kb/a179d5e20f79ced21fe240180059cc6a to your computer and use it in GitHub Desktop.
Convert PDF to PS Using C#. For more information, please follow link: https://kb.groupdocs.com/conversion/net/convert-pdf-to-ps-using-csharp/
using GroupDocs.Conversion;
namespace ConvertPDFtoPSUsingCSharp
{
internal class Program
{
static void Main(string[] args)
{
// Set License to avoid the limitations of Conversion library
License lic = new License();
lic.SetLicense(@"GroupDocs.Conversion.lic");
// Load the source PDF file
using (var converter = new Converter("input.pdf"))
{
var options = converter.GetPossibleConversions()["ps"].ConvertOptions;
// Convert to PS format
converter.Convert("converted.ps", options);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment