Split PDF via Aspose.PDF for Python via C++

Files splitting with the help of Aspose.PDF for Python via C++ Tool.

Split Files Using Aspose.PDF for Python via C++

In order to split files, we’ll use Aspose.PDF API which is a feature-rich, powerful and easy-to-use document manipulation API for python-cpp platform. Open NuGet package manager, search for Aspose.PDF and install. You may also use the following command from the Package Manager Console. Our software tool also provides developers to split Word, PDF, HTML, TXT, and DOCX documents into parts. For more details please learn Documentation Pages.

Split documents via Python


You need Aspose.PDF library to try the code in your environment.

<% splitter.json-ld-python-cpp.text %>

How to split PDF using Python

With the Aspose.PDF library, you can split large PDF documents. Splitting a PDF document is a common use case when working with PDF documents. It helps reduce the size of a PDF file by breaking large documents into smaller files to send via email.

Split PDF - Python

This sample code shows how to split PDF file - Python

import AsposePDFPythonWrappers as apw

document = apw.Document("sample.pdf")

pageCount = 1

for page in document.pages:
    newDocument = apw.Document()
    newDocument.pages.add(page)
    newDocument.save("page_" + pageCount + "_out" + ".pdf")
    pageCount += 1