aspose-page


Nameaspose-page JSON
Version 24.2.0 PyPI version JSON
download
home_pagehttps://products.aspose.com/page/python-net/
SummaryAspose.Page for Python via .NET makes your Python Apps instantly support to work with XPS, EPS/PS documents without installing any 3rd party software. It helps developers create/edit XPS documents while working with canvas, paths, and glyph elements. Utilize a set of primitives, such as, elliptical arcs, straights lines, Bezier curve segments to create vector graphics. Add default print tickets and preserve them in the XPS file. Link print ticket objects among job/document/page.
upload_time2024-02-26 15:28:13
maintainer
docs_urlNone
authorAspose
requires_python>=3.6,<3.12
licenseOther/Proprietary License
keywords aspose.page ps eps xps oxps postscript pdf convert conversion ps-to-pdf ps-to-png ps-to-jpg ps-to-tiff ps-to-bmp eps-to-pdf eps-to-png eps-to-jpg eps-to-tiff eps-to-bmp xps-to-pdf xps-to-png xps-to-jpg xps-to-tiff xps-to-bmp sign-xps esign electronic signature windows macos linux postscript-to-pdf postscript-to-png bulk library aspose.total
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PS and XPS File Manipulation via Python API

<!-- ![Version 24.1.0](https://img.shields.io/badge/nuget-v24.1.0-blue) ![Nuget](https://img.shields.io/nuget/dt/Aspose.Page) -->

[![banner](https://products.aspose.com/page/icons/banner_python.png)](https://releases.aspose.com/page/python-net/)

[Product Page](https://products.aspose.com/page/python-net/) | [Docs](https://docs.aspose.com/page/python-net/) | [Demos](https://products.aspose.app/page/family) | [API Reference](https://reference.aspose.com/page/python-net/) | [Examples](https://github.com/aspose-page/Aspose.Page-for-Python-.NET) | [Blog](https://blog.aspose.com/category/page/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/page) | [Temporary License](https://purchase.aspose.com/temporary-license/)

[Aspose.Page for Python via .NET](https://products.aspose.com/page/python-net/) is an on premise Python API that allows you to add PS/EPS and XPS manipulation features to your own applications. The API also supports converting XPS, EPS & PS documents to other formats.

Developers can perform various operations on PS and XPS documents, such as, add text, images, pages, gradient, grid using the visual brush, [transparency object](https://docs.aspose.com/page/python-net/xps/working-with-transparency/#add-transparent-object-inside-xps-document/) and [set opacity mask](https://docs.aspose.com/page/python-net/xps/working-with-transparency/#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.
- Create PS & EPS documents via API.
- Add pages to PS & 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.

## 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

## Platform Independence

Aspose.Page for Python via .NET can be used to develop 32-bit and 64-bit Python applications for Windows where Python 3.5 or later is installed.

## Get Started

Are you ready to give Aspose.Page for Python a try? Simply execute `pip install aspose-page` to install wheel package package. If you already have Aspose.Page for Python and want to upgrade the version, please execute `pip install --upgrade aspose-page` to get the latest version.

## Create an XPS Document from Scratch via Python Code

Execute the below code snippet to see how Aspose.Page API performs in your own environment or check the [GitHub Repository](https://github.com/aspose-page/Aspose.Page-for-Python-via-.NET) for other common usage scenarios. 

```python
# The path to the documents directory.
dir = Util.get_data_dir_working_with_document()
# Create new XPS Document
x_docs = XpsDocument()

# add glyph to the document
glyphs = x_docs.add_glyphs("Arial", 12, aspose.pydrawing.FontStyle.REGULAR, 300, 450, "Hello World!")

glyphs.fill = x_docs.create_solid_color_brush(aspose.pydrawing.Color.black)

# save result
x_docs.save(dir + "output.xps")
```

## Convert a PostScript (PS) File to PDF Format

Aspose.Page for Python allows you to work with document conversion, such as; PS to images, PS to PDF, XPS to images, XPS to PDF and so on. The following snippet demonstrates the conversion of PS to PDF using streams:

```python
# The path to the documents directory.
data_dir = Util.get_data_dir_working_with_document_conversion()
# Initialize PDF output stream
pdf_stream = open(data_dir + "outputPDF_out.pdf", "wb")
# Initialize PostScript input stream
ps_stream = open(data_dir + "input.ps", "rb",)
document = PsDocument(ps_stream)

# If you want to convert Postscript file despite of minor errors set this flag
suppress_errors = True

#Initialize options object with necessary parameters.
options = PdfSaveOptions(suppress_errors)
# If you want to add special folder where fonts are stored. Default fonts folder in OS is always included.
options.additional_fonts_folders = [ """{FONT_FOLDER}""" ]

# Default page size is 595x842 and it is not mandatory to set it in PdfDevice
device = PdfDevice(pdf_stream)
# But if you need to specify size and image format use following line
#Aspose.Page.EPS.Device.PdfDevice device = new Aspose.Page.EPS.Device.PdfDevice(pdfStream, new aspose.pydrawing.Size(595, 842));

try:
    document.save(device, options)
finally:
    ps_stream.close()
    pdf_stream.close()
```

[Product Page](https://products.aspose.com/page/python-net/) | [Docs](https://docs.aspose.com/page/python-net/) | [Demos](https://products.aspose.app/page/family) | [API Reference](https://reference.aspose.com/page/python-net/) | [Examples](https://github.com/aspose-page/Aspose.Page-for-Python-via-.NET) | [Blog](https://blog.aspose.com/category/page/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/page) | [Temporary License](https://purchase.aspose.com/temporary-license/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://products.aspose.com/page/python-net/",
    "name": "aspose-page",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6,<3.12",
    "maintainer_email": "",
    "keywords": "Aspose.Page PS EPS XPS OXPS PostScript PDF convert conversion ps-to-pdf ps-to-png ps-to-jpg ps-to-tiff ps-to-bmp eps-to-pdf eps-to-png eps-to-jpg eps-to-tiff eps-to-bmp xps-to-pdf xps-to-png xps-to-jpg xps-to-tiff xps-to-bmp sign-XPS eSign electronic signature Windows macOS Linux postscript-to-pdf postscript-to-png bulk Library Aspose.Total",
    "author": "Aspose",
    "author_email": "",
    "download_url": "",
    "platform": "win32",
    "description": "# PS and XPS File Manipulation via Python API\r\n\r\n<!-- ![Version 24.1.0](https://img.shields.io/badge/nuget-v24.1.0-blue) ![Nuget](https://img.shields.io/nuget/dt/Aspose.Page) -->\r\n\r\n[![banner](https://products.aspose.com/page/icons/banner_python.png)](https://releases.aspose.com/page/python-net/)\r\n\r\n[Product Page](https://products.aspose.com/page/python-net/) | [Docs](https://docs.aspose.com/page/python-net/) | [Demos](https://products.aspose.app/page/family) | [API Reference](https://reference.aspose.com/page/python-net/) | [Examples](https://github.com/aspose-page/Aspose.Page-for-Python-.NET) | [Blog](https://blog.aspose.com/category/page/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/page) | [Temporary License](https://purchase.aspose.com/temporary-license/)\r\n\r\n[Aspose.Page for Python via .NET](https://products.aspose.com/page/python-net/) is an on premise Python API that allows you to add PS/EPS and XPS manipulation features to your own applications. The API also supports converting XPS, EPS & PS documents to other formats.\r\n\r\nDevelopers can perform various operations on PS and XPS documents, such as, add text, images, pages, gradient, grid using the visual brush, [transparency object](https://docs.aspose.com/page/python-net/xps/working-with-transparency/#add-transparent-object-inside-xps-document/) and [set opacity mask](https://docs.aspose.com/page/python-net/xps/working-with-transparency/#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.\r\n\r\n## XPS, EPS & PS Processing Features\r\n\r\n- Create & modify XPS documents via API.\r\n- Create PS & EPS documents via API.\r\n- Add pages to PS & XPS documents.\r\n- Create vector graphic shapes (Path element) and text strings (Glyphs element).\r\n- Group various elements as well as modify the appearance of text strings and graphics.\r\n- Support for visual brush, image brush, solid color brush, and more.\r\n- Work with multiple documents within an XPS document.\r\n- Preserve print tickets and add default print tickets to new XPS documents.\r\n- Perform cross-package operations such as inserting a page from another document.\r\n- Conversion of XPS, PS & EPS documents to other popular formats.\r\n- Supports PostScript language levels 1-3 with an exception of font types: Type2 (CFF), Type14 (Chameleon), Types 9, 10, 11.\r\n\r\n## Supported Read Formats\r\n\r\nXPS, EPS, PS\r\n\r\n## Save XPS Documents As\r\n\r\n**Fixed Layout:** PDF\\\r\n**Image:** BMP, TIFF, JPEG, PNG\r\n\r\n## Save PS & EPS Documents As\r\n\r\n**Metafiles:** EMF, WMF\\\r\n**Animation:** GIF\\\r\n**Image:** BMP, TIFF, JPEG, PNG\r\n\r\n## Platform Independence\r\n\r\nAspose.Page for Python via .NET can be used to develop 32-bit and 64-bit Python applications for Windows where Python 3.5 or later is installed.\r\n\r\n## Get Started\r\n\r\nAre you ready to give Aspose.Page for Python a try? Simply execute `pip install aspose-page` to install wheel package package. If you already have Aspose.Page for Python and want to upgrade the version, please execute `pip install --upgrade aspose-page` to get the latest version.\r\n\r\n## Create an XPS Document from Scratch via Python Code\r\n\r\nExecute the below code snippet to see how Aspose.Page API performs in your own environment or check the [GitHub Repository](https://github.com/aspose-page/Aspose.Page-for-Python-via-.NET) for other common usage scenarios. \r\n\r\n```python\r\n# The path to the documents directory.\r\ndir = Util.get_data_dir_working_with_document()\r\n# Create new XPS Document\r\nx_docs = XpsDocument()\r\n\r\n# add glyph to the document\r\nglyphs = x_docs.add_glyphs(\"Arial\", 12, aspose.pydrawing.FontStyle.REGULAR, 300, 450, \"Hello World!\")\r\n\r\nglyphs.fill = x_docs.create_solid_color_brush(aspose.pydrawing.Color.black)\r\n\r\n# save result\r\nx_docs.save(dir + \"output.xps\")\r\n```\r\n\r\n## Convert a PostScript (PS) File to PDF Format\r\n\r\nAspose.Page for Python allows you to work with document conversion, such as; PS to images, PS to PDF, XPS to images, XPS to PDF and so on. The following snippet demonstrates the conversion of PS to PDF using streams:\r\n\r\n```python\r\n# The path to the documents directory.\r\ndata_dir = Util.get_data_dir_working_with_document_conversion()\r\n# Initialize PDF output stream\r\npdf_stream = open(data_dir + \"outputPDF_out.pdf\", \"wb\")\r\n# Initialize PostScript input stream\r\nps_stream = open(data_dir + \"input.ps\", \"rb\",)\r\ndocument = PsDocument(ps_stream)\r\n\r\n# If you want to convert Postscript file despite of minor errors set this flag\r\nsuppress_errors = True\r\n\r\n#Initialize options object with necessary parameters.\r\noptions = PdfSaveOptions(suppress_errors)\r\n# If you want to add special folder where fonts are stored. Default fonts folder in OS is always included.\r\noptions.additional_fonts_folders = [ \"\"\"{FONT_FOLDER}\"\"\" ]\r\n\r\n# Default page size is 595x842 and it is not mandatory to set it in PdfDevice\r\ndevice = PdfDevice(pdf_stream)\r\n# But if you need to specify size and image format use following line\r\n#Aspose.Page.EPS.Device.PdfDevice device = new Aspose.Page.EPS.Device.PdfDevice(pdfStream, new aspose.pydrawing.Size(595, 842));\r\n\r\ntry:\r\n    document.save(device, options)\r\nfinally:\r\n    ps_stream.close()\r\n    pdf_stream.close()\r\n```\r\n\r\n[Product Page](https://products.aspose.com/page/python-net/) | [Docs](https://docs.aspose.com/page/python-net/) | [Demos](https://products.aspose.app/page/family) | [API Reference](https://reference.aspose.com/page/python-net/) | [Examples](https://github.com/aspose-page/Aspose.Page-for-Python-via-.NET) | [Blog](https://blog.aspose.com/category/page/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/page) | [Temporary License](https://purchase.aspose.com/temporary-license/)\r\n",
    "bugtrack_url": null,
    "license": "Other/Proprietary License",
    "summary": "Aspose.Page for Python via .NET makes your Python Apps instantly support to work with XPS, EPS/PS documents without installing any 3rd party software. It helps developers create/edit XPS documents while working with canvas, paths, and glyph elements. Utilize a set of primitives, such as, elliptical arcs, straights lines, Bezier curve segments to create vector graphics. Add default print tickets and preserve them in the XPS file. Link print ticket objects among job/document/page.",
    "version": "24.2.0",
    "project_urls": {
        "API Reference": "https://reference.aspose.com/page/python-net/",
        "Blog": "https://blog.aspose.com/categories/aspose.page-product-family/",
        "Demos": "https://products.aspose.app/page/family/",
        "Docs": "https://docs.aspose.com/page/python-net/",
        "Free Support": "https://forum.aspose.com/c/page/",
        "Homepage": "https://products.aspose.com/page/python-net/",
        "Temporary License": "https://purchase.aspose.com/temporary-license/"
    },
    "split_keywords": [
        "aspose.page",
        "ps",
        "eps",
        "xps",
        "oxps",
        "postscript",
        "pdf",
        "convert",
        "conversion",
        "ps-to-pdf",
        "ps-to-png",
        "ps-to-jpg",
        "ps-to-tiff",
        "ps-to-bmp",
        "eps-to-pdf",
        "eps-to-png",
        "eps-to-jpg",
        "eps-to-tiff",
        "eps-to-bmp",
        "xps-to-pdf",
        "xps-to-png",
        "xps-to-jpg",
        "xps-to-tiff",
        "xps-to-bmp",
        "sign-xps",
        "esign",
        "electronic",
        "signature",
        "windows",
        "macos",
        "linux",
        "postscript-to-pdf",
        "postscript-to-png",
        "bulk",
        "library",
        "aspose.total"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2076624dbb86ba62d20377b49b8659f09af4f4e9c3e057cf1f7763709338d881",
                "md5": "967cdc0042141dc4067a28e3128c8810",
                "sha256": "cf80972a604866cafe48f600c6f1a81781fa71b391e0071d7c4226a74b30ae0a"
            },
            "downloads": -1,
            "filename": "aspose_page-24.2.0-py3-none-win32.whl",
            "has_sig": false,
            "md5_digest": "967cdc0042141dc4067a28e3128c8810",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6,<3.12",
            "size": 42153471,
            "upload_time": "2024-02-26T15:28:13",
            "upload_time_iso_8601": "2024-02-26T15:28:13.041856Z",
            "url": "https://files.pythonhosted.org/packages/20/76/624dbb86ba62d20377b49b8659f09af4f4e9c3e057cf1f7763709338d881/aspose_page-24.2.0-py3-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f13f8ce8ca79209317430971be27af351456943755ff37404d5d9cb716557cc7",
                "md5": "b1e2efe8156833c484eaed00c71d6de1",
                "sha256": "cec611d0b3abe0bcc126c44f8fdd1e49c5bbc19a0eb8d07cd65d90ebddaf8e80"
            },
            "downloads": -1,
            "filename": "aspose_page-24.2.0-py3-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "b1e2efe8156833c484eaed00c71d6de1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6,<3.12",
            "size": 47469388,
            "upload_time": "2024-02-26T15:28:23",
            "upload_time_iso_8601": "2024-02-26T15:28:23.783392Z",
            "url": "https://files.pythonhosted.org/packages/f1/3f/8ce8ca79209317430971be27af351456943755ff37404d5d9cb716557cc7/aspose_page-24.2.0-py3-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-26 15:28:13",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "aspose-page"
}
        
Elapsed time: 0.19583s