miPDFlib.PostScript 1.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package miPDFlib.PostScript --version 1.3.0
                    
NuGet\Install-Package miPDFlib.PostScript -Version 1.3.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="miPDFlib.PostScript" Version="1.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="miPDFlib.PostScript" Version="1.3.0" />
                    
Directory.Packages.props
<PackageReference Include="miPDFlib.PostScript" />
                    
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 miPDFlib.PostScript --version 1.3.0
                    
#r "nuget: miPDFlib.PostScript, 1.3.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 miPDFlib.PostScript@1.3.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=miPDFlib.PostScript&version=1.3.0
                    
Install as a Cake Addin
#tool nuget:?package=miPDFlib.PostScript&version=1.3.0
                    
Install as a Cake Tool

miPDFlib.PostScript

PostScript and EPS for miPDFlib: convert PostScript files to PDF and place EPS graphics in PDF documents. Pure managed code for .NET 8 and .NET 10, without native dependencies (Apache-2.0).

Converting PostScript to PDF

using MiPdf;
using MiPdf.PostScript;

using var document = PostScriptConverter.ToPdf(File.ReadAllBytes("report.ps"),
    new PostScriptOptions { PageSize = PageSize.A4, Timeout = TimeSpan.FromMinutes(1) });
document.Save("report.pdf");

Text keeps its fonts (Type 1, Type 3, Type 42, CID-keyed), and graphics, images, patterns and shadings stay vectors. pdfmark adds document information, bookmarks, links, annotations, named destinations, article threads and embedded files. The document information is also taken from the DSC comments (%%Title, %%Creator, %%For). Pages are rotated to be read upright, by the orientation in the DSC comments or by the direction of their text (AutoRotatePages). EPS files become a page of their bounding box; print files with a PJL header and DOS EPS binary files are read too.

Placing EPS graphics

var logo = document.ImportEps(File.ReadAllBytes("logo.eps"));   // a form XObject of the bounding box
var page = document.AddPage();
using (var canvas = page.GetCanvas())
    canvas.DrawXObject(logo, 50, 700, width: 120, height: 120 * logo.Height / logo.Width);

Sandbox and errors

PostScript is a programming language: the interpreter runs in a sandbox without access to the file system, with limits on operations, memory and time (PostScriptOptions). A PostScript error throws a PostScriptException with the error name, the offending command and the program's output, unless IgnoreErrors keeps what was painted before it (as a printer prints the pages up to the error).

Licensed under the Apache License, Version 2.0.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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. 
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
1.5.0 0 11/16/2026
1.4.0 54 11/12/2026
1.3.0 53 11/11/2026