A Ghostscript alternative you can ship in closed-source software

Convert PostScript, EPS and XPS to PDF and images from a managed .NET library with no native converter binary or copyleft obligations.

 

You need to convert PostScript, EPS or XPS files inside your product. The Artifex tools do this well and cost nothing to download: Ghostscript interprets PostScript and EPS, and GhostXPS covers XPS. Then your legal team reads the licence, and the project stops.

This page explains what the licensing constraint is, what your options are — including the ones that do not involve us — and how to migrate if Aspose.Page is the right fit.

Aspose.Page is a commercial .NET library for conversion and rendering. It is designed for redistribution in closed-source applications without requiring a native Ghostscript installation.

What the licence actually requires

Ghostscript has been dual-licensed under the GNU Affero General Public License v3 since version 9.07 in February 2013. Before that it was GPL v3. Artifex Software owns the copyright and sells a commercial licence as the alternative to AGPL compliance. The same dual licensing covers the wider GhostPDL source tree, which includes the GhostXPS interpreter, so handling XPS instead of PostScript does not change the licensing question.

The AGPL's copyleft provision can require the complete corresponding source code of a derivative work to be released under the AGPL. It also extends to software offered to users over a network, so a SaaS product that never ships a binary is not automatically outside its scope.

The nuance that matters: linking versus shelling out

A common position is that invoking `gs` as a separate process avoids copyleft because the application is not linked to the library. This is genuinely contested territory. Guidance differs on whether a process boundary is decisive or whether the intimacy of the communication and the design of the combined program matter more.

We are not your lawyers, and this page is not legal advice. Your legal team must assess how your product is built, offered and distributed. For many teams, the uncertainty itself is a cost they are unwilling to carry.

Case law

In *Artifex Software, Inc. v. Hancom, Inc.*, Artifex alleged that Hancom had incorporated GPL-licensed Ghostscript into Hancom Office without buying a commercial licence or complying with the GPL's source-disclosure requirements.

On 25 April 2017, the U.S. District Court for the Northern District of California denied Hancom's motion to dismiss. The ruling allowed Artifex to proceed on both breach of contract and copyright infringement. The parties settled in December 2017.

The significance is narrow: an open source licence is enforceable. The ruling does not decide that every integration or separate-process invocation creates a derivative work.

Your options

There are three honest routes, and only one of them involves us.

1. Buy a commercial licence from Artifex

Artifex sells a commercial licence so companies can use Ghostscript in closed-source products. This is a legitimate, supported route and is likely the right choice when you depend on Ghostscript's full capability set.

Choose this if: you use Ghostscript as a full PostScript or PDF interpreter or RIP, including colour separations, print devices, PDF input or complex RIP workflows.

2. Replace the component

If the requirement is narrower — converting PS, EPS or XPS files to PDF or images — a purpose-built commercial library can cover it without the same licensing question.

Choose this if: your usage is conversion and rendering, and you prefer a managed NuGet package to a native binary in every deployment.

3. Drop the feature

If format conversion is a rarely used convenience, removing it may cost less than either licence.

Choose this if: the feature is not important enough to justify a commercial licence or a migration.

Where Aspose.Page fits — and where it does not

Aspose.Page is a good fit if you need to:

  • Convert PostScript (PS) and EPS files to PDF.
  • Convert XPS and OXPS documents to PDF.
  • Render any of those formats to PNG, JPEG, TIFF or BMP.
  • Merge multiple PS or XPS documents.
  • Create and edit XPS documents programmatically.
  • Read and write XMP metadata in EPS files.
  • Crop, resize and transform EPS files.
  • Run conversion inside a closed-source commercial product, server, container or serverless function.

Aspose.Page is the wrong tool if you need:

  • A full PostScript interpreter or RIP with device-level control.
  • PDF files as input — use Aspose.PDF , which is a different product.
  • CMYK colour separations or prepress-grade print-device output.
  • Ghostscript’s pdfwrite distiller behaviour reproduced exactly.

If you are in the second list, the Artifex commercial licence is the better fit. It will cost less than a migration that cannot reach parity.

What a native converter costs you in a container

Every route to Ghostscript from .NET — `Ghostscript.NET`, direct P/Invoke or invoking `gs` as a process — ends with the native binary and its shared libraries in the image. That creates continuing operational work:

  • Image size. You are shipping an interpreter, not only a converter.
  • CVE patching. Ghostscript vulnerabilities become part of your patching and rebuild cadence.
  • Base-image lock-in. Native builds and shared libraries constrain which base images you can use; glibc and musl builds are not interchangeable.
  • Environment drift. Development machines, CI runners and production hosts must carry compatible native versions.
  • Azure Functions Consumption plan. Native packages cannot be installed there, which is a hard stop rather than a deployment inconvenience. See the technical guide for Docker and serverless deployment .

A managed library removes the native converter from those concerns. You must still package and configure the fonts required by your documents.

Ghostscript versus Aspose.Page for .NET

  • Licence — Ghostscript: AGPL v3, or commercial from Artifex. Aspose.Page: commercial only.
  • Source disclosure — Ghostscript: required when the AGPL applies. Aspose.Page: not required.
  • Network and SaaS — Ghostscript: network use is within AGPL scope. Aspose.Page: commercial deployment is covered by the purchased licence.
  • Implementation — Ghostscript: native C binary. Aspose.Page: managed .NET library with no native converter binary.
  • .NET integration — Ghostscript: process invocation or a wrapper such as Ghostscript.NET. Aspose.Page: NuGet package and direct API.
  • Deployment — Ghostscript: install or bundle the native binary and shared libraries. Aspose.Page: package the managed assemblies with the application.
  • Input formats — Ghostscript: PS, EPS, PDF and more; XPS needs GhostXPS, a separate interpreter from the same GhostPDL tree. Aspose.Page: PS, EPS, XPS and OXPS in one library.
  • Output — Ghostscript: PDF plus a wide range of raster and print devices. Aspose.Page: PDF, PNG, JPEG, TIFF and BMP.
  • Scope — Ghostscript: full interpreter and RIP. Aspose.Page: conversion, rendering and document manipulation.
  • Pricing — Ghostscript: commercial pricing is quoted by Artifex. Aspose.Page: published tiers from US$599.

Migration

PostScript or EPS to PDF

C# conversion replacing the `gs` pdfwrite command

using System;
using Aspose.Page.EPS;
using Aspose.Page.EPS.Device;
PsDocument document = new PsDocument("input.ps");
PdfSaveOptions options = new PdfSaveOptions(true);
options.AdditionalFontsFolders = new string[] { @"C:\MyFonts" };
document.SaveAsPdf("output.pdf", options);
foreach (Exception ex in options.Exceptions)
{
    Console.WriteLine(ex.Message);
}

Replaces: `gs -sDEVICE=pdfwrite -o output.pdf input.ps`

PostScript or EPS to images

C# conversion replacing the `gs` png16m command

using System.IO;
using Aspose.Page.EPS;
using Aspose.Page.EPS.Device;
PsDocument document = new PsDocument("input.ps");
ImageSaveOptions options = new ImageSaveOptions();
options.ImageFormat = Aspose.Page.Drawing.Imaging.ImageFormat.Png;
byte[][] imagesBytes = document.SaveAsImagesBytes(options);
for (int i = 0; i < imagesBytes.Length; i++)
{
    File.WriteAllBytes("page_" + i + ".png", imagesBytes[i]);
}
// One byte array is returned for each page.

Replaces: `gs -sDEVICE=png16m -o page_%d.png input.ps`

XPS to PDF

C# XPS-to-PDF conversion

using System.IO;
using Aspose.Page.XPS;
using Aspose.Page.XPS.Presentation.Pdf;
using (Stream pdfStream = File.Open("output.pdf", FileMode.Create, FileAccess.Write))
{
    XpsDocument document = new XpsDocument("input.xps");
    PdfSaveOptions options = new PdfSaveOptions
    {
        JpegQualityLevel = 100,
        ImageCompression = PdfImageCompression.Jpeg,
        TextCompression = PdfTextCompression.Flate
    };
    document.SaveAsPdf(pdfStream, options);
}
// gs does not read XPS; the Artifex equivalent is gxps.

`gs` does not read XPS. The Artifex equivalent is `gxps` from GhostPDL, under the same dual licence.

Which licence do you need?

These published prices were checked on 26 October 2026. Confirm current pricing on the [Aspose.Page for .NET pricing page](https://purchase.aspose.com/pricing/page/net).

  • Internal tool, one developer and one deployment location: Developer Small Business — US$599.
  • Embedded in a product distributed to customers, or a public web application: Developer OEM — US$1,797.
  • Distributed as part of an SDK or API you sell: Developer SDK — US$11,980.
  • A team or wider organisation deployment: Site licences are available; see the pricing page.

For a Ghostscript replacement shipped inside a commercial product or public web application, Developer OEM is normally the right tier. It covers one developer, unlimited deployment locations and external distribution.

Perpetual licences include one year of updates, with discounted renewal available.

Try it before you commit

Unlicensed evaluation output carries a watermark. A free 30-day temporary licence removes evaluation limits so you can test your own files before buying.

Bring your most difficult PostScript file. If it does not convert correctly, it is better to find out during evaluation than after purchase.