Aspose.Page.Drawing 26.10.0

Prefix Reserved
dotnet add package Aspose.Page.Drawing --version 26.10.0
                    
NuGet\Install-Package Aspose.Page.Drawing -Version 26.10.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aspose.Page.Drawing" Version="26.10.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aspose.Page.Drawing" Version="26.10.0" />
                    
Directory.Packages.props
<PackageReference Include="Aspose.Page.Drawing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aspose.Page.Drawing --version 26.10.0
                    
#r "nuget: Aspose.Page.Drawing, 26.10.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aspose.Page.Drawing@26.10.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aspose.Page.Drawing&version=26.10.0
                    
Install as a Cake Addin
#tool nuget:?package=Aspose.Page.Drawing&version=26.10.0
                    
Install as a Cake Tool

PostScript, EPS & XPS Processing via .NET API for Linux, macOS & Containers

Version NuGet

banner

Product Page | Docs | Demos | API Reference | Examples | Blog | Releases | Free Support | Temporary License

This is the cross-platform build of Aspose.Page for .NET. If you are running on Linux, macOS, or in a container, this is the package you want.

It is the same API as Aspose.Page, built on Aspose.Drawing � our own fully managed graphics library � instead of System.Drawing.Common. There are no native dependencies, nothing to install on the host, and no PlatformNotSupportedException.

Which package do I need?

Where your code runs Package
Windows, .NET Framework Aspose.Page
Linux, macOS, Docker, Kubernetes, AWS Lambda, Azure Functions Aspose.Page.Drawing (this package)

Aspose.Page depends on System.Drawing.Common, which has been Windows-only since .NET 7 � that is why this separate build exists. Install one package or the other, not both.

Both packages are released on the same schedule, so whichever version of Aspose.Page you were using, there is a matching Aspose.Page.Drawing.

What it does

Aspose.Page is an on-premise .NET API for processing PostScript (PS), EPS and XPS documents. It converts them to PDF and to raster images, and lets you create and edit XPS documents programmatically.

Developers can perform various operations on XPS documents, such as, add text, images, pages, gradient, grid using the visual brush, transparency object and set opacity mask. It allows you to create, edit and convert the file pages as well as the ability to manipulate documents and elements, create vector graphics, group shapes, and specifying colors in different color spaces including sRGB, scRGB, and any space-based on ICC profile.

XPS, EPS & PS Processing Features

  • Create & modify XPS documents via API.
  • Add pages to XPS documents.
  • Create vector graphic shapes (Path element) and text strings (Glyphs element).
  • Group various elements as well as modify the appearance of text strings and graphics.
  • Support for visual brush, image brush, solid color brush, and more.
  • Work with multiple documents within an XPS document.
  • Preserve print tickets and add default print tickets to new XPS documents.
  • Perform cross-package operations such as inserting a page from another document.
  • Conversion of XPS, PS & EPS documents to other popular formats.
  • Supports PostScript language levels 1-3 with an exception of font types: Type2 (CFF), Type14 (Chameleon), Types 9, 10, 11, 32 (CID-Keyed).

Supported Read Formats

XPS, EPS, PS

Save XPS Documents As

Fixed Layout: PDF
Image: BMP, TIFF, JPEG, PNG

Save PS & EPS Documents As

Metafiles: EMF, WMF
Animation: GIF
Image: BMP, TIFF, JPEG, PNG

Platforms

Built for .NET Standard 2.0 and .NET 7.0, so it also covers .NET Core 2.x and .NET 8 and later. Runs on Linux, macOS and Windows alike � there is no platform-specific code and no native binary.

Get Started

dotnet add package Aspose.Page.Drawing

Or from the Package Manager Console in Visual Studio:

Install-Package Aspose.Page.Drawing

Convert a PostScript (PS) File to PDF

Conversion code is identical to the Windows package � nothing to adapt.

using Aspose.Page.EPS;
using Aspose.Page.EPS.Device;

// load the PostScript document
var document = new PsDocument(dir + "template.ps");

// carry on past recoverable problems and collect them instead of throwing
var options = new PdfSaveOptions(true);

document.SaveAsPdf(dir + "output.pdf", options);

// anything that was recovered from is reported here � including notices that a
// referenced font was not found and a substitute was used
foreach (var ex in options.Exceptions)
{
    Console.WriteLine(ex.Message);
}

See the GitHub repository for other common usage scenarios.

Running in Docker

FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim

# No converter to install. A font configuration is still needed � see below.
RUN apt-get update \
 && apt-get install -y --no-install-recommends \
      fontconfig \
      fonts-dejavu-core \
 && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "MyApp.dll"]

A note on fonts

Dropping the native dependency does not remove the need for fonts, and this is what trips up most container deployments.

  • Documents with embedded fonts convert correctly in a minimal image � the glyphs are in the file.
  • Documents that reference fonts by name need those fonts resolvable in the container. If a name cannot be resolved, a substitute is used and the output is wrong rather than failing � which is harder to notice, because nothing throws.

For arbitrary third-party input, install fonts-dejavu-core and fonts-liberation; the latter provides metric-compatible substitutes for Arial, Times New Roman and Courier New. For fonts you ship yourself:

options.AdditionalFontsFolders = new string[] { "/app/fonts" };

The OS font folder is always included in addition to whatever you specify.

To find out which case you are in, convert a representative file in an image with no font packages and compare the result against a known-good render.

Migrating from Aspose.Page

If you only convert or read documents, there is nothing to change. Switch the package reference and rebuild � same classes, same methods, same using statements.

If you construct PS or XPS documents programmatically, the using aliases that point at System.Drawing need to point at Aspose.Page.Drawing instead. The type names are identical, so this is a find-and-replace of the namespace:

using PointF = Aspose.Page.Drawing.PointF;
using SizeF = Aspose.Page.Drawing.SizeF;
using Size = Aspose.Page.Drawing.Size;
using Color = Aspose.Page.Drawing.Color;
using RectangleF = Aspose.Page.Drawing.RectangleF;
using GraphicsPath = Aspose.Page.Drawing.Drawing2D.GraphicsPath;
using Matrix = Aspose.Page.Drawing.Drawing2D.Matrix;
using Brush = Aspose.Page.Drawing.Brush;
using SolidBrush = Aspose.Page.Drawing.SolidBrush;
using TextureBrush = Aspose.Page.Drawing.TextureBrush;
using HatchBrush = Aspose.Page.Drawing.Drawing2D.HatchBrush;
using LinearGradientBrush = Aspose.Page.Drawing.Drawing2D.LinearGradientBrush;
using PathGradientBrush = Aspose.Page.Drawing.Drawing2D.PathGradientBrush;
using ColorBlend = Aspose.Page.Drawing.Drawing2D.ColorBlend;
using WrapMode = Aspose.Page.Drawing.Drawing2D.WrapMode;
using HatchStyle = Aspose.Page.Drawing.Drawing2D.HatchStyle;
using Pen = Aspose.Page.Drawing.Pen;
using DashStyle = Aspose.Page.Drawing.Drawing2D.DashStyle;
using SFont = Aspose.Page.Drawing.Font;
using FontStyle = Aspose.Page.Drawing.FontStyle;
using Bitmap = Aspose.Page.Drawing.Bitmap;

The same rule applies to any other System.Drawing type you alias.

Create an XPS Document from Scratch

using Aspose.Page.XPS;
using Color = Aspose.Page.Drawing.Color;
using FontStyle = Aspose.Page.Drawing.FontStyle;

// create XPS document
var xDocs = new XpsDocument();

// add glyphs to the document
var glyphs = xDocs.AddGlyphs("Arial", 12, FontStyle.Regular, 300f, 450f, "Hello World!");
glyphs.Fill = xDocs.CreateSolidColorBrush(Color.Black);

// save result
xDocs.Save(dir + "output.xps");

This package was introduced in Aspose.Page for .NET 24.4.

Product Page | Docs | Demos | API Reference | Examples | Blog | Releases | Free Support | Temporary License


Try Aspose.Page Plugins

Product Page | Docs | Demos | API Reference | Examples | Blog | Releases | Free Support | Temporary License

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
26.10.0 205 10/19/2026
26.9.0 1,907 9/23/2026
26.8.0 1,316 8/21/2026
26.7.0 949 7/21/2026
26.6.0 656 6/19/2026
26.5.0 612 5/26/2026
26.4.0 613 4/21/2026
26.2.0 1,089 2/20/2026
26.1.0 708 1/20/2026
25.12.0 1,245 12/10/2025
25.11.0 708 11/14/2025
25.10.0 723 10/14/2025
25.9.1 875 9/8/2025
25.9.0 340 9/22/2025
25.8.0 892 8/25/2025
25.7.0 899 7/17/2025
25.6.2 908 6/23/2025
25.5.0 532 5/23/2025
Loading failed