Aspose.Page for .NET offers a comprehensive feature set to manage different page description elements on the .NET platform. It helps developers programmatically create, render, and convert XPS files and manipulate EPS and PostScript documents. Developers can create, add, and modify pages in XPS files, insert text and images into XPS and PostScript files, work with glyphs, canvas, and paths, manipulate vector graphic shape elements and text strings, and manage print tickets. It supports drawing shapes in PostScript documents and using solid color, image, and visual brushes.
The XPS file processing API for .NET boasts excellent conversion capabilities to convert XPS, EPS, and PostScript files to PDF documents and JPEG, PNG, BMP, and TIFF images, EMF, and WMF files. Users can upgrade their .NET page processing solutions by incorporating the supported conversion features for seamlessly converting XPS to PDF, PostScript to PDF, EPS to PDF, XPS to JPEG, PS to PNG, and more. Aspose.Page for .NET provides merging functionality to merge PostScript or XPS documents while also supporting cross-package operations.
Please review the following information for conveniently setting up Aspose.Page for .NET. The System Requirements page lists the prerequisites to ensure you have the recommended OS, development environment, and framework requirements enabled at your end before installing the PostScript and XPS file processing API.
Please visit the downloads section to download the MSI installer or the DLLs to install the .NET page manipulation library. Or, you can utilize the NuGet package to set up the library in the Visual Studio Package Manager Console using the following command:
Aspose.Page for .NET includes many options for manipulating different elements of page description language (PDL) formats such as PostScript, EPS, and XPS. It allows working with pages, text, and images, and users can build .NET solutions to insert text, images, and new pages into files of supported formats. It is one of the best .NET libraries for XPS to PDF conversion and lets users effortlessly convert PostScript and EPS documents to PDF and raster images.
As part of the XPS document generation, manipulation, and processing capabilities of Aspose.Page for .NET API, inserting text into XPS files is a prominent feature. In the following C# code example, we will review how to add text to XPS files quickly and easily, so let’s check the steps involved.
// Create a new XPS Document XpsDocument doc = new XpsDocument(); // Create a brush XpsSolidColorBrush textFill = doc.CreateSolidColorBrush(Color.Black); // Add glyph to the document XpsGlyphs glyphs = doc.AddGlyphs("Arial", 12, FontStyle.Regular, 300f, 450f, "Hello World!"); glyphs.Fill = textFill; // Save the resultant XPS document doc.Save("AddText_out.xps");
Developers can enjoy a full-cycle XPS document processing experience in .NET with the XPS library. They can convert XPS files to different formats within their .NET apps. The following steps and C# coding example explain how to convert XPS to PDF on the .NET platform with various save options.
// The path to the documents directory. string dataDir = "C:\\TestFiles\\"; // Initialize PDF output stream using (Stream pdfStream = File.Open(dataDir + "XPStoPDF.pdf", FileMode.Create, FileAccess.Write)) // Initialize XPS input stream using (Stream xpsStream = File.Open(dataDir + "input.xps", FileMode.Open, FileAccess.Read)) { // Load XPS document form the stream XpsDocument document = new XpsDocument(xpsStream, new XpsLoadOptions()); // Initialize options object with necessary parameters. PdfSaveOptions options = new PdfSaveOptions() { JpegQualityLevel = 100, ImageCompression = PdfImageCompression.Jpeg, TextCompression = PdfTextCompression.Flate, PageNumbers = new int[] { 1 } }; // Create a rendering device for PDF format PdfDevice device = new PdfDevice(pdfStream); // Save the converted PDF document document.Save(device, options); }
Please visit the GitHub examples page of Aspose.Page for .NET API to view more working code examples. If you are looking to view, convert, or sign EPS, PostScript, and XPS documents on the fly, please check our cross-platform Free Online XPS and PostScript Processing Apps today.
Aspose.Page for .NET API is loaded with features that provide impeccable rendering and manipulation of the PostScript documents. The API supports working with a host of PostScript file elements such as shapes, images, gradients, textures, transparency, text, pages, and more. The advanced PostScript manipulation capability allows developers to augment their existing page processing solutions in .NET by efficiently integrating the PS document manipulation functionality or building new solutions from scratch.
Converting these files in .NET is quick and easy using the EPS, PostScript, and XPS file processing API for .NET. It helps you seamlessly convert PS, EPS, and XPS files to PDF, JPEG, PNG, TIFF, BMP, EMF, WMF, and more.
The XPS document API works fast and completes your PostScript and XPS file reading, writing, converting, and processing requests in no time.
You can be sure of the security of your data files while processing them using the PS file manipulation API. We ensure the privacy of your data and take all required measures to provide you with a secure user experience.
Yes, the .NET XPS library works across different OS, frameworks, and operating environments. You can use it on the platform of your choice & it does not require any additional software installation to function.