Aspose.Page for .NET – PS/EPS/XPS Conversion FAQ
Q: What file formats can Aspose.Page for .NET convert from and to?
A: From: PostScript (.ps), Encapsulated PostScript (.eps) and XML Paper Specification (.xps).
To: PDF, SVG, PNG, JPEG, BMP, GIF, TIFF (raster & multipage), EMF/WMF and any image format supported by Aspose.Imaging (e.g., WEBP).
Q: Which .NET versions are supported?
A: .NET Framework 4.6+, .NET Core 2.0+, and .NET 5, 6, 7, 8. The library is delivered as a NuGet package (Aspose.Page) and runs on Windows, Linux and macOS.
Q: Do I need any external dependencies such as Ghostscript or ImageMagick?
A: No. Aspose.Page is a pure‑managed library; all rendering and conversion logic is built‑in, requiring no native binaries or third‑party tools.
Q: How do I convert a PS/EPS/XPS file to PDF in C#?
A:
1using Aspose.Page;
2using Aspose.Page.Drawing;
3
4// Load the source document
5using (var document = new Document("input.ps"))
6{
7 // Save as PDF
8 document.Save("output.pdf", SaveFormat.Pdf);
9}Replace the file extension with .eps or .xps to handle those formats.
Q: Can I convert multi‑page PS/EPS/XPS files to multipage PDFs or image stacks?
A: Yes. The Document object represents the entire source document. Saving to PDF produces a multipage PDF. When saving to image formats you can:
- Generate one image per page (default)
- Combine pages into a multipage TIFF by setting
TiffSaveOptions.MultiPage = true.
Q: Is it possible to set the resolution/DPI of the output images?
A: Absolutely. Use format‑specific save options and set ResolutionX / ResolutionY (or DpiX / DpiY). Example for PNG:
1var options = new PngSaveOptions { ResolutionX = 300, ResolutionY = 300 };
2document.Save("page1.png", options);Q: How can I control page size, orientation or cropping during conversion?
A: Each page exposes a PageInfo object where you can read/write Width, Height, Orientation, Margin and ClipRect. Transformations can also be applied via the GDI+‑style graphics API (Graphics, Matrix).
Q: Does Aspose.Page preserve color spaces and transparency?
A: Yes. Original color profiles (DeviceRGB, CMYK) and transparency are retained when converting to PDF, PNG, TIFF or SVG. For formats without CMYK support (e.g., JPEG), the engine performs automatic color conversion while maintaining visual fidelity.
Q: Can I convert a document in memory without touching the file system?
A: Yes. Load from a Stream (e.g., MemoryStream) and save directly to another Stream:
1using (var input = new MemoryStream(File.ReadAllBytes("sample.xps")))
2using (var doc = new Document(input))
3using (var output = new MemoryStream())
4{
5 doc.Save(output, SaveFormat.Pdf);
6 // output.ToArray() now holds the PDF bytes
7}Q: Is there licensing required for production use?
A: A free trial works in license‑free mode and adds a small watermark on PDFs. For commercial deployment you must purchase an Aspose.Page license file (Aspose.Page.lic). Apply it with:
1var license = new License();
2license.SetLicense("Aspose.Page.lic");All restrictions are removed thereafter.
Q: What are the typical performance characteristics?
A: Conversion speed: ~150‑250 ms per page on a modern CPU (Intel i7‑12‑core) for PS/EPS → PDF.
Memory usage: stays below 100 MB for documents up to 150 pages.
Scalability: supports asynchronous processing and parallel conversion of separate pages when needed.
Q: How do I handle errors such as “Invalid PS file” or “Unsupported XPS feature”?
A: Runtime errors throw Aspose.Page.Exceptions subclasses (FileFormatException, ConversionException, etc.). Wrap conversions in try/catch blocks, inspect Message and ErrorCode. Call Document.Validate() for pre‑flight checks if required.
Q: Are there any sample projects or code snippets available?
A: Yes. The official Aspose.Page GitHub repository contains ready‑to‑run samples for:
- PS/EPS → PDF
- XPS → SVG
- Multi‑page TIFF export
- In‑memory stream conversion
All samples reside under/Examples/CSharp/Conversion.
Q: Where can I find documentation and API reference?
A:
•
Official docs
•
API reference (typedocs)
• Knowledge Base with “How‑to” articles covering common conversion scenarios.
Q: Is technical support provided?
A: Yes. Licensed customers receive email & ticket‑based support from Aspose engineers (response time ≤ 24 h). Community forums are open to all users for general questions.