aspose-pdf


Nameaspose-pdf JSON
Version 24.6.0 PyPI version JSON
download
home_pagehttps://products.aspose.com/pdf/python-net/
SummaryAspose.PDF for Python via .NET is a PDF Processing library to perform document management can easily be used to generate, modify, convert, render, secure and print documents without using Adobe Acrobat.
upload_time2024-06-26 18:23:22
maintainerNone
docs_urlNone
authorAspose
requires_python<3.13,>=3.7
licenseOther/Proprietary License
keywords aspose.pdf pdf xfa xps tiff pcl svg html xml xsl-fo fdf xfdf pdf/a form portfolio epub psd to xls pdf-to-doc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [Product Page](https://products.aspose.com/pdf/python-net/) | [Documentation](https://docs.aspose.com/pdf/python-net/) | [Demos](https://products.aspose.app/pdf/family) | [Blog](https://blog.aspose.com/categories/aspose.pdf-product-family/) | [API Reference](https://reference.aspose.com/pdf/python-net/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/pdf) | [Temporary License](https://purchase.aspose.com/temporary-license)

Try our [Free Online Apps](https://products.aspose.app/pdf/applications) demonstrating some of the most popular Aspose.PDF functionality.

**Aspose.PDF for Python via .NET** is a native library that enables the developers to add PDF processing capabilities to their applications. It can be used to generate or read, convert and manipulate PDF files without the use of Adobe Acrobat. **Aspose.PDF for Python via .NET** allows to perform a range of document processing tasks such as form processing, get and set metadata information, text and page manipulation, management of annotations, add or remove bookmarks and watermarks, attachments, custom font handling and much more.
Check out the [Landing Pages](https://products.aspose.com/pdf/python-net/) of **Aspose.PDF for Python via .NET** for a more detailed description of the features and possibilities of the library.

## General PDF Features

- Supports most established PDF standards and PDF specifications.
- Ability to read & export PDFs in multiple image formats including BMP, GIF, JPEG & PNG.  
- Set basic information (e.g. author, creator) of the PDF document.
- Configure PDF Page properties (e.g. width, height, cropbox, bleedbox etc.).
- Set page numbering, bookmark level, page sizes etc.
- Ability to work with text, paragraphs, headings, hyperlinks, graphs, attachments etc.

## Supported PDF versions

**Aspose.PDF for Python via .NET** supports PDF versions 1.2, 1.3, 1.4, 1.5, 1.6, 1.7 and 2.0.

## Conversion Features

**Aspose.PDF for Python via .NET** library allows you to successfully, quickly and easily convert your PDF documents to the most popular formats and vice versa.

- Convert PDF to Word, Excel, and PowerPoint.
- Convert PDF to Images formats.
- Convert PDF file to HTML format and vice versa.
- Convert PDF to EPUB, Text, XPS, etc.
- Convert EPUB, Markdown, Text, XPS, PostScript, XML, LaTex to PDF.

## Package Features

- Add, search, extract and replace text in PDF files.
- Add/delete, extract and replace images.
- Insert, delete, split PDF pages.
- Set and get XMP metadata.
- Validate (PDF/A-1a, PDF/A-1b).
- Work with bookmarks, annotations, PDF forms, stamps, watermarks and more.

## Supported File Formats

The following table indicates the file formats that **Aspose.PDF for Python via .NET** can load and Save.

|**Format**|**Description**|**Load**|**Save**|**Remarks**|
| :- | :- | :- | :- | :- |
|[PDF](https://docs.fileformat.com/pdf/)|Portable Document Format|**Yes**|**Yes**| |
|[CGM](https://docs.fileformat.com/page-description-language/cgm/)|Computer Graphics Metafile for 2D vector graphics|**Yes**|**No**| |
|[EPUB](https://docs.fileformat.com/ebook/epub/)|Ebook file format|**Yes**|**Yes**| |
|[HTML](https://docs.fileformat.com/web/html/)|HTML Format|**Yes**|**Yes**| |
|[TeX](https://docs.fileformat.com/page-description-language/tex/)|LaTex typesetting file format|**Yes**|**Yes**| |
|[MHT](https://docs.fileformat.com/web/mhtml/)|MHTML Document|**Yes**|**No**| |
|[PCL](https://docs.fileformat.com/page-description-language/pcl/)|Printer Control Language Files|**Yes**|**No**| |
|[PS](https://docs.fileformat.com/page-description-language/ps/)|Postscript Files|**Yes**|**No**| |
|[SVG](https://docs.fileformat.com/page-description-language/svg/)|Scalable Vector Graphics (An XML-based vector image format)|**Yes**|**Yes**| |
|[XML](https://docs.fileformat.com/web/xml/)|XML Format|**Yes**|**Yes**| |
|[XPS](https://docs.fileformat.com/page-description-language/xps/)|XPS Documents|**Yes**|**Yes**| |
|[XSLFO](https://docs.fileformat.com/page-description-language/xslfo/)|XSL-FO is part of XSL file which is used for the transformation and formatting of XML data|**Yes**|**No**| |
|[MD](https://docs.fileformat.com/word-processing/md/)|Markdown Format|**Yes**|**No**| |
|[XLS](https://docs.fileformat.com/spreadsheet/xls/)|Saves the document in the Microsoft Excel SpreadSheet|**No**|**Yes**| |
|[XLSX](https://docs.fileformat.com/spreadsheet/xlsx/)|Saves the document in the Microsoft Excel 2007 format|**No**|**Yes**| |
|[PPTX](https://docs.fileformat.com/presentation/pptx/)|Saves the document in the Microsoft PowerPoint Presentations format|**No**|**Yes**| |
|[DOC](https://docs.fileformat.com/word-processing/doc/)|Saves the document in the Microsoft Word format|**No**|**Yes**| |
|[DOCX](https://docs.fileformat.com/word-processing/docx/)|Saves the document in the Microsoft Word format|**No**|**Yes**| |
|[MobiXML](https://docs.fileformat.com/ebook/mobi/)|Saves the document in eBook MobiXML Standard format|**No**|**Yes**| |
|[JPEG](https://docs.fileformat.com/image/jpeg/)|Saves the document in JPEG Format|**Yes**|**Yes**| |
|[EMF](https://docs.fileformat.com/image/emf/)|Enhanced metafile format (EMF)|**Yes**|**Yes**| |
|[PNG](https://docs.fileformat.com/image/png/)|Saves the document in PNG Format|**Yes**|**Yes**| |
|[BMP](https://docs.fileformat.com/image/bmp/)|Saves the document in BMP Format|**Yes**|**Yes**| |
|[GIF](https://docs.fileformat.com/image/gif/)|Graphic Interchange Format|**No**|**Yes**| |
|[TIFF](https://docs.fileformat.com/image/tiff/)|Saves the document as Single or Multi-Page TIFF Image|**Yes**|**Yes**| |
|[Text](https://docs.fileformat.com/word-processing/txt/)|Save the document int Text Format|**Yes**|**Yes**| |

## Platform Independence

**Aspose.PDF for Python via .NET** can be used to develop 32-bit and 64-bit Python applications for different operating systems (such as Windows and Linux) where Python 3.7 or later is installed.


## Get Started

Run ```pip install aspose-pdf``` to fetch the package. If you already have **Aspose.PDF for Python via .NET** and want to get the latest version, please run ```pip install --upgrade aspose-pdf```.

To learn more about **Aspose.PDF for Python via .NET** and explore the basic requirements and features of the library, check out the following [Aspose.PDF for Python via .NET Documentation](https://docs.aspose.com/pdf/python-net/) pages for other use cases.

## Create a PDF file from scratch in Python

In the next code snippet, we are creating a PDF document fron scratch containing the text “Hello World!”. After installing **Aspose.PDF for Python via .NET** in your environment, you can execute below code sample to see how Aspose.PDF API works. 

Below code snippet follows these steps:

1. Instantiate a Document object.
1. Add a Page to the document object.
1. Create a TextFragment object.
1. Add TextFragment to Paragraph collection of the page.
1. Save the resultant PDF document.

The following code snippet is a “Hello, World!” program to exhibit working of **Aspose.PDF for Python via .NET** API:

```python
import aspose.pdf as ap

# Initialize document object
document = ap.Document()
# Add page
page = document.pages.add()
# Initialize textfragment object
text_fragment = ap.text.TextFragment("Hello,world!")
# Add text fragment to new page
page.paragraphs.add(text_fragment)
# Save updated PDF
document.save("output.pdf")
```

## Example of converting HTML to PDF

**Aspose.PDF for Python via .NET** is a PDF manipulation API that lets you convert any existing HTML documents to PDF format. The process of converting HTML to PDF can be flexibly customized.

Below code snippet follows these steps:

1. Create an instance of the HtmlLoadOptions object.
1. Initialize Document object.
1. Save output PDF document by calling Document.Save() method.

```python
import aspose.pdf as ap
# Instantiate an object of HtmlLoadOptions
options = ap.HtmlLoadOptions()
# Convert HTML to PDF
document = ap.Document("input.html", options)
# Save PDF
document.save("output.pdf")
```

## Example of converting PDF to SVG

**Aspose.PDF for Python via .NET** supports the feature to convert SVG image to PDF format. To accomplish this requirement, the SvgSaveOptions class has been introduced into the Aspose.PDF namespace. Instantiate an object of SvgSaveOptions and pass it as a second argument to the Document.Save(..) method.

Below code snippet follows these steps:

1. Create an object of the Document class.
1. Create SvgSaveOptions object with needed settings.
1. Call the Document.Save() method and pass it SvgSaveOptions object convert the PDF document to SVG.

```python
import aspose.pdf as ap

# Open PDF document
document = ap.Document("input.pdf")

# Instantiate an object of SvgSaveOptions
saveOptions = ap.SvgSaveOptions()

# Do not compress SVG image to Zip archive
saveOptions.compress_output_to_zip_archive = False
saveOptions.treat_target_file_name_as_directory = True

# Save the output in SVG files
document.save("output.svg", saveOptions)
```

## Merge PDF Files

Merge multiple PDF into single file in Python with Aspose.PDF programmatically. PDF files are merged such that the first one is joined at the end of the other document.

Below code snippet follows these steps:

1. Open first document.
1. Open second document.
1. Add pages of second document to the first.
1. Save concatenated output file.

```python
import aspose.pdf as ap

# Open first document
document1 = ap.Document("input_1.pdf")
# Open second document
document2 = ap.Document("input_2.pdf")

# Add pages of second document to the first
document1.pages.add(document2.pages)

# Save concatenated output file
document1.save("output.pdf")
```

## Print PDF to XPS printer

You can print a PDF file to an XPS printer, or some other soft printer for that matter, using the PdfViewer class. 

Below code snippet follows these steps:


1. Create an object of the PdfViewer class.
1. Open the PDF file using the bind_pdf method.
1. Set different print settings using the PrinterSettings and PageSettings classes.
1. Set the printer_name property to the XPS or other printer.
1. Print document using the print_document_with_settings method.

```python
import aspose.pdf as ap
import aspose.pydrawing as drawing

# Create PdfViewer object
viewer = ap.facades.PdfViewer()

# Open input PDF file
viewer.bind_pdf("input.pdf")

# Set attributes for printing
# Print the file with adjusted size
viewer.auto_resize = True
# Print the file with adjusted rotation
viewer.auto_rotate = True
# Do not produce the page number dialog when printing
viewer.print_page_dialog = False

# Create objects for printer and page settings
ps = ap.printing.PrinterSettings()
pgs = ap.printing.PageSettings()

# Set XPS/PDF printer name
ps.printer_name = "Microsoft XPS Document Writer"
# Or set the PDF printer
# ps.printer_name = "Adobe PDF"

# Set PageSize(if required)
pgs.paper_size = ap.printing.PaperSize("A4", 827, 1169)

# Set PageMargins(if required)
pgs.margins = ap.devices.Margins(0, 0, 0, 0)

# Print document using printer and page settings
viewer.print_document_with_settings(pgs, ps)

# Close the PDF file after printing
viewer.close()
```

[Product Page](https://products.aspose.com/pdf/python-net/) | [Documentation](https://docs.aspose.com/pdf/python-net/) | [Demos](https://products.aspose.app/pdf/family) | [Blog](https://blog.aspose.com/categories/aspose.pdf-product-family/) | [API Reference](https://reference.aspose.com/pdf/python-net/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/pdf) | [Temporary License](https://purchase.aspose.com/temporary-license)


            

Raw data

            {
    "_id": null,
    "home_page": "https://products.aspose.com/pdf/python-net/",
    "name": "aspose-pdf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.7",
    "maintainer_email": null,
    "keywords": "Aspose.PDF, PDF, XFA, XPS, TIFF, PCL, SVG, HTML, XML, XSL-FO, FDF, XFDF, PDF/A, form, Portfolio, EPUB, PSD, to, XLS, PDF-to-DOC",
    "author": "Aspose",
    "author_email": null,
    "download_url": null,
    "platform": "linux_x86_64",
    "description": "[Product Page](https://products.aspose.com/pdf/python-net/) | [Documentation](https://docs.aspose.com/pdf/python-net/) | [Demos](https://products.aspose.app/pdf/family) | [Blog](https://blog.aspose.com/categories/aspose.pdf-product-family/) | [API Reference](https://reference.aspose.com/pdf/python-net/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/pdf) | [Temporary License](https://purchase.aspose.com/temporary-license)\n\nTry our [Free Online Apps](https://products.aspose.app/pdf/applications) demonstrating some of the most popular Aspose.PDF functionality.\n\n**Aspose.PDF for Python via .NET** is a native library that enables the developers to add PDF processing capabilities to their applications. It can be used to generate or read, convert and manipulate PDF files without the use of Adobe Acrobat. **Aspose.PDF for Python via .NET** allows to perform a range of document processing tasks such as form processing, get and set metadata information, text and page manipulation, management of annotations, add or remove bookmarks and watermarks, attachments, custom font handling and much more.\nCheck out the [Landing Pages](https://products.aspose.com/pdf/python-net/) of **Aspose.PDF for Python via .NET** for a more detailed description of the features and possibilities of the library.\n\n## General PDF Features\n\n- Supports most established PDF standards and PDF specifications.\n- Ability to read & export PDFs in multiple image formats including BMP, GIF, JPEG & PNG.  \n- Set basic information (e.g. author, creator) of the PDF document.\n- Configure PDF Page properties (e.g. width, height, cropbox, bleedbox etc.).\n- Set page numbering, bookmark level, page sizes etc.\n- Ability to work with text, paragraphs, headings, hyperlinks, graphs, attachments etc.\n\n## Supported PDF versions\n\n**Aspose.PDF for Python via .NET** supports PDF versions 1.2, 1.3, 1.4, 1.5, 1.6, 1.7 and 2.0.\n\n## Conversion Features\n\n**Aspose.PDF for Python via .NET** library allows you to successfully, quickly and easily convert your PDF documents to the most popular formats and vice versa.\n\n- Convert PDF to Word, Excel, and PowerPoint.\n- Convert PDF to Images formats.\n- Convert PDF file to HTML format and vice versa.\n- Convert PDF to EPUB, Text, XPS, etc.\n- Convert EPUB, Markdown, Text, XPS, PostScript, XML, LaTex to PDF.\n\n## Package Features\n\n- Add, search, extract and replace text in PDF files.\n- Add/delete, extract and replace images.\n- Insert, delete, split PDF pages.\n- Set and get XMP metadata.\n- Validate (PDF/A-1a, PDF/A-1b).\n- Work with bookmarks, annotations, PDF forms, stamps, watermarks and more.\n\n## Supported File Formats\n\nThe following table indicates the file formats that **Aspose.PDF for Python via .NET** can load and Save.\n\n|**Format**|**Description**|**Load**|**Save**|**Remarks**|\n| :- | :- | :- | :- | :- |\n|[PDF](https://docs.fileformat.com/pdf/)|Portable\u00a0Document Format|**Yes**|**Yes**|\u00a0|\n|[CGM](https://docs.fileformat.com/page-description-language/cgm/)|Computer Graphics Metafile for 2D vector graphics|**Yes**|**No**|\u00a0|\n|[EPUB](https://docs.fileformat.com/ebook/epub/)|Ebook file format|**Yes**|**Yes**|\u00a0|\n|[HTML](https://docs.fileformat.com/web/html/)|HTML Format|**Yes**|**Yes**|\u00a0|\n|[TeX](https://docs.fileformat.com/page-description-language/tex/)|LaTex typesetting file\u00a0format|**Yes**|**Yes**|\u00a0|\n|[MHT](https://docs.fileformat.com/web/mhtml/)|MHTML Document|**Yes**|**No**|\u00a0|\n|[PCL](https://docs.fileformat.com/page-description-language/pcl/)|Printer Control Language Files|**Yes**|**No**|\u00a0|\n|[PS](https://docs.fileformat.com/page-description-language/ps/)|Postscript Files|**Yes**|**No**|\u00a0|\n|[SVG](https://docs.fileformat.com/page-description-language/svg/)|Scalable Vector Graphics (An XML-based vector image format)|**Yes**|**Yes**|\u00a0|\n|[XML](https://docs.fileformat.com/web/xml/)|XML Format|**Yes**|**Yes**|\u00a0|\n|[XPS](https://docs.fileformat.com/page-description-language/xps/)|XPS Documents|**Yes**|**Yes**|\u00a0|\n|[XSLFO](https://docs.fileformat.com/page-description-language/xslfo/)|XSL-FO is part of XSL file which is used\u00a0for the transformation and formatting of XML data|**Yes**|**No**|\u00a0|\n|[MD](https://docs.fileformat.com/word-processing/md/)|Markdown Format|**Yes**|**No**|\u00a0|\n|[XLS](https://docs.fileformat.com/spreadsheet/xls/)|Saves the document in the Microsoft Excel SpreadSheet|**No**|**Yes**|\u00a0|\n|[XLSX](https://docs.fileformat.com/spreadsheet/xlsx/)|Saves the document in the Microsoft Excel 2007 format|**No**|**Yes**|\u00a0|\n|[PPTX](https://docs.fileformat.com/presentation/pptx/)|Saves the document in the Microsoft PowerPoint Presentations format|**No**|**Yes**|\u00a0|\n|[DOC](https://docs.fileformat.com/word-processing/doc/)|Saves the document in the Microsoft Word format|**No**|**Yes**|\u00a0|\n|[DOCX](https://docs.fileformat.com/word-processing/docx/)|Saves the document in the Microsoft Word format|**No**|**Yes**|\u00a0|\n|[MobiXML](https://docs.fileformat.com/ebook/mobi/)|Saves the document in eBook MobiXML Standard format|**No**|**Yes**|\u00a0|\n|[JPEG](https://docs.fileformat.com/image/jpeg/)|Saves the document in JPEG Format|**Yes**|**Yes**|\u00a0|\n|[EMF](https://docs.fileformat.com/image/emf/)|Enhanced metafile format (EMF)|**Yes**|**Yes**|\u00a0|\n|[PNG](https://docs.fileformat.com/image/png/)|Saves the document in PNG Format|**Yes**|**Yes**|\u00a0|\n|[BMP](https://docs.fileformat.com/image/bmp/)|Saves the document in BMP Format|**Yes**|**Yes**|\u00a0|\n|[GIF](https://docs.fileformat.com/image/gif/)|Graphic Interchange\u00a0Format|**No**|**Yes**|\u00a0|\n|[TIFF](https://docs.fileformat.com/image/tiff/)|Saves the document as Single or Multi-Page TIFF Image|**Yes**|**Yes**|\u00a0|\n|[Text](https://docs.fileformat.com/word-processing/txt/)|Save the document int Text Format|**Yes**|**Yes**|\u00a0|\n\n## Platform Independence\n\n**Aspose.PDF for Python via .NET** can be used to develop 32-bit and 64-bit Python applications for different operating systems (such as Windows and Linux) where Python 3.7 or later is installed.\n\n\n## Get Started\n\nRun ```pip install aspose-pdf``` to fetch the package. If you already have **Aspose.PDF for Python via .NET** and want to get the latest version, please run ```pip install --upgrade aspose-pdf```.\n\nTo learn more about **Aspose.PDF for Python via .NET** and explore the basic requirements and features of the library, check out the following [Aspose.PDF for Python via .NET Documentation](https://docs.aspose.com/pdf/python-net/) pages for other use cases.\n\n## Create a PDF file from scratch in Python\n\nIn the next code snippet, we are creating a PDF document fron scratch containing the text \u201cHello World!\u201d. After installing **Aspose.PDF for Python via .NET** in your environment, you can execute below code sample to see how Aspose.PDF API works. \n\nBelow code snippet follows these steps:\n\n1. Instantiate a Document object.\n1. Add a Page to the document object.\n1. Create a TextFragment object.\n1. Add TextFragment to Paragraph collection of the page.\n1. Save the resultant PDF document.\n\nThe following code snippet is a \u201cHello, World!\u201d program to exhibit working of **Aspose.PDF for Python via .NET** API:\n\n```python\nimport aspose.pdf as ap\n\n# Initialize document object\ndocument = ap.Document()\n# Add page\npage = document.pages.add()\n# Initialize textfragment object\ntext_fragment = ap.text.TextFragment(\"Hello,world!\")\n# Add text fragment to new page\npage.paragraphs.add(text_fragment)\n# Save updated PDF\ndocument.save(\"output.pdf\")\n```\n\n## Example of converting HTML to PDF\n\n**Aspose.PDF for Python via .NET** is a PDF manipulation API that lets you convert any existing HTML documents to PDF format. The process of converting HTML to PDF can be flexibly customized.\n\nBelow code snippet follows these steps:\n\n1. Create an instance of the HtmlLoadOptions object.\n1. Initialize Document object.\n1. Save output PDF document by calling Document.Save() method.\n\n```python\nimport aspose.pdf as ap\n# Instantiate an object of HtmlLoadOptions\noptions = ap.HtmlLoadOptions()\n# Convert HTML to PDF\ndocument = ap.Document(\"input.html\", options)\n# Save PDF\ndocument.save(\"output.pdf\")\n```\n\n## Example of converting PDF to SVG\n\n**Aspose.PDF for Python via .NET** supports the feature to convert SVG image to PDF format. To accomplish this requirement, the SvgSaveOptions class has been introduced into the Aspose.PDF namespace. Instantiate an object of SvgSaveOptions and pass it as a second argument to the Document.Save(..) method.\n\nBelow code snippet follows these steps:\n\n1. Create an object of the Document class.\n1. Create SvgSaveOptions object with needed settings.\n1. Call the Document.Save() method and pass it SvgSaveOptions object convert the PDF document to SVG.\n\n```python\nimport aspose.pdf as ap\n\n# Open PDF document\ndocument = ap.Document(\"input.pdf\")\n\n# Instantiate an object of SvgSaveOptions\nsaveOptions = ap.SvgSaveOptions()\n\n# Do not compress SVG image to Zip archive\nsaveOptions.compress_output_to_zip_archive = False\nsaveOptions.treat_target_file_name_as_directory = True\n\n# Save the output in SVG files\ndocument.save(\"output.svg\", saveOptions)\n```\n\n## Merge PDF Files\n\nMerge multiple PDF into single file in Python with Aspose.PDF programmatically. PDF files are merged such that the first one is joined at the end of the other document.\n\nBelow code snippet follows these steps:\n\n1. Open first document.\n1. Open second document.\n1. Add pages of second document to the first.\n1. Save concatenated output file.\n\n```python\nimport aspose.pdf as ap\n\n# Open first document\ndocument1 = ap.Document(\"input_1.pdf\")\n# Open second document\ndocument2 = ap.Document(\"input_2.pdf\")\n\n# Add pages of second document to the first\ndocument1.pages.add(document2.pages)\n\n# Save concatenated output file\ndocument1.save(\"output.pdf\")\n```\n\n## Print PDF to XPS printer\n\nYou can print a PDF file to an XPS printer, or some other soft printer for that matter, using the PdfViewer class. \n\nBelow code snippet follows these steps:\n\n\n1. Create an object of the PdfViewer class.\n1. Open the PDF file using the bind_pdf method.\n1. Set different print settings using the PrinterSettings and PageSettings classes.\n1. Set the printer_name property to the XPS or other printer.\n1. Print document using the print_document_with_settings method.\n\n```python\nimport aspose.pdf as ap\nimport aspose.pydrawing as drawing\n\n# Create PdfViewer object\nviewer = ap.facades.PdfViewer()\n\n# Open input PDF file\nviewer.bind_pdf(\"input.pdf\")\n\n# Set attributes for printing\n# Print the file with adjusted size\nviewer.auto_resize = True\n# Print the file with adjusted rotation\nviewer.auto_rotate = True\n# Do not produce the page number dialog when printing\nviewer.print_page_dialog = False\n\n# Create objects for printer and page settings\nps = ap.printing.PrinterSettings()\npgs = ap.printing.PageSettings()\n\n# Set XPS/PDF printer name\nps.printer_name = \"Microsoft XPS Document Writer\"\n# Or set the PDF printer\n# ps.printer_name = \"Adobe PDF\"\n\n# Set PageSize(if required)\npgs.paper_size = ap.printing.PaperSize(\"A4\", 827, 1169)\n\n# Set PageMargins(if required)\npgs.margins = ap.devices.Margins(0, 0, 0, 0)\n\n# Print document using printer and page settings\nviewer.print_document_with_settings(pgs, ps)\n\n# Close the PDF file after printing\nviewer.close()\n```\n\n[Product Page](https://products.aspose.com/pdf/python-net/) | [Documentation](https://docs.aspose.com/pdf/python-net/) | [Demos](https://products.aspose.app/pdf/family) | [Blog](https://blog.aspose.com/categories/aspose.pdf-product-family/) | [API Reference](https://reference.aspose.com/pdf/python-net/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/pdf) | [Temporary License](https://purchase.aspose.com/temporary-license)\n\n",
    "bugtrack_url": null,
    "license": "Other/Proprietary License",
    "summary": "Aspose.PDF for Python via .NET is a PDF Processing library to perform document management can easily be used to generate, modify, convert, render, secure and print documents without using Adobe Acrobat.",
    "version": "24.6.0",
    "project_urls": {
        "API Reference": "https://reference.aspose.com/pdf/python-net/",
        "Blog": "https://blog.aspose.com/categories/aspose.pdf-product-family/",
        "Demos": "https://products.aspose.app/pdf/family",
        "Docs": "https://docs.aspose.com/pdf/python-net/",
        "Free Support": "https://forum.aspose.com/c/pdf",
        "Homepage": "https://products.aspose.com/pdf/python-net/",
        "Temporary License": "https://purchase.aspose.com/temporary-license"
    },
    "split_keywords": [
        "aspose.pdf",
        " pdf",
        " xfa",
        " xps",
        " tiff",
        " pcl",
        " svg",
        " html",
        " xml",
        " xsl-fo",
        " fdf",
        " xfdf",
        " pdf/a",
        " form",
        " portfolio",
        " epub",
        " psd",
        " to",
        " xls",
        " pdf-to-doc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "10a52e11440fb92cc096b735701154c2d36d6823bb4a92068f0e197746cd39a5",
                "md5": "4e2da28f3a62e86bd5d15b71dc8339bd",
                "sha256": "a23817e2cb2c834662511452a6b9228deeaf1ae44d20a8b4c75b8f12acd79fd3"
            },
            "downloads": -1,
            "filename": "aspose_pdf-24.6.0-py3-none-manylinux1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "4e2da28f3a62e86bd5d15b71dc8339bd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.7",
            "size": 107784024,
            "upload_time": "2024-06-26T18:23:22",
            "upload_time_iso_8601": "2024-06-26T18:23:22.242745Z",
            "url": "https://files.pythonhosted.org/packages/10/a5/2e11440fb92cc096b735701154c2d36d6823bb4a92068f0e197746cd39a5/aspose_pdf-24.6.0-py3-none-manylinux1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1037cec01c501bf0a0111d37ba2db2717a5b1e0f8e01dbba678647915927b26a",
                "md5": "3e911e98485078af6892a7d510a61984",
                "sha256": "06bfb05419aef1283750dfabd07c3e68d8d81625e148953779212d3374d8d020"
            },
            "downloads": -1,
            "filename": "aspose_pdf-24.6.0-py3-none-win32.whl",
            "has_sig": false,
            "md5_digest": "3e911e98485078af6892a7d510a61984",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.7",
            "size": 78770899,
            "upload_time": "2024-06-26T18:25:55",
            "upload_time_iso_8601": "2024-06-26T18:25:55.641348Z",
            "url": "https://files.pythonhosted.org/packages/10/37/cec01c501bf0a0111d37ba2db2717a5b1e0f8e01dbba678647915927b26a/aspose_pdf-24.6.0-py3-none-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "309d6624b4bb46ee60bcb949763f70eedf7da8abab3a882985a5e150db19122c",
                "md5": "ed91673f6d9f2d55ed058d25dbc6faa8",
                "sha256": "ffdf0fccbe618e3baef1acdf8e2632bbf2467d4828d9d315ba96eb76bef35662"
            },
            "downloads": -1,
            "filename": "aspose_pdf-24.6.0-py3-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "ed91673f6d9f2d55ed058d25dbc6faa8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.7",
            "size": 85909675,
            "upload_time": "2024-06-26T18:28:05",
            "upload_time_iso_8601": "2024-06-26T18:28:05.476836Z",
            "url": "https://files.pythonhosted.org/packages/30/9d/6624b4bb46ee60bcb949763f70eedf7da8abab3a882985a5e150db19122c/aspose_pdf-24.6.0-py3-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-26 18:23:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "aspose-pdf"
}
        
Elapsed time: 0.26846s