Frequently Asked Questions
Licensing & Open Source
What license does Aspose.Page FOSS for Python use?
Aspose.Page FOSS for Python is released under the MIT License. The full license text
is available in the LICENSE file in the GitHub repository.
Can I use it in commercial products?
Yes. The MIT license permits use in proprietary and commercial applications without requiring you to open-source your own code.
Is there a free trial or usage limit?
No. The library is fully free under the MIT license with no usage limits, no watermarks, and no time restrictions.
Installation & Requirements
How do I install Aspose.Page FOSS for Python?
Install from PyPI using pip:
pip install aspose-page-foss>=0.1.0What Python version is required?
Python 3.10 or later is required.
Are there any native dependencies?
No. The library has no dependency on Ghostscript, Adobe Reader, or any other native runtime. It runs on Windows, Linux, and macOS without additional system packages.
Format Support
Which input formats does the library support?
The library reads PostScript (.ps), Encapsulated PostScript (.eps), and XML Paper
Specification (.xps) files.
Which output formats does the library produce?
The library exports to PDF (via to_pdf()) and to PNG or JPEG raster images (via
to_image() with ImageSaveOptions).
Can the library create PS or XPS files from scratch?
PsDocument provides create() and add_page() methods for constructing new PS
documents, and XpsDocument provides create() and add_page() for XPS. Use
PsDocument.save() or XpsDocument.save() to write the result.
API Usage
How do I convert a PS file to PDF?
from pathlib import Path
from aspose.page.ps.document import PsDocument
ps = PsDocument.from_file("input.ps")
Path("output.pdf").write_bytes(ps.to_pdf())How do I convert an EPS file to PNG?
from pathlib import Path
from aspose.page.ps.document import PsDocument
from aspose.page.ps.output import ImageSaveOptions
eps = PsDocument.from_file("input.eps")
opts = ImageSaveOptions(format="png", dpi=150)
Path("output.png").write_bytes(eps.to_image(opts))How do I convert an XPS file to PDF?
from pathlib import Path
from aspose.page.xps.document import XpsDocument
xps = XpsDocument.from_file("input.xps")
Path("output.pdf").write_bytes(xps.to_pdf())How do I read EPS metadata before converting?
from aspose.page.ps.document import PsDocument
eps = PsDocument.from_file("illustration.eps")
dsc = eps.dsc
if dsc is not None:
print("Title:", dsc.title)
print("Bounding box:", dsc.bounding_box)How do I process files from memory without disk I/O?
Use from_bytes() to load from raw bytes and use the returned bytes from to_pdf()
or to_image() directly:
from aspose.page.ps.document import PsDocument
def convert_ps_bytes(ps_data: bytes) -> bytes:
return PsDocument.from_bytes(ps_data).to_pdf()Known Limitations
Does the library support all PostScript features?
The library implements the common PostScript operators needed for document conversion. Highly specialized PostScript programs using advanced Level 3 features or custom procedures may not render identically to Ghostscript.
Is there write support for XPS page content?
XpsDocument supports add_page(), remove_page(), and get_page() for page
structure management. Low-level XPS content drawing is available through the
RenderModelBuilder and PdfWriter components.