Insert an Empty Page into a PDF File in Python

Contents
[ ]

To Insert an Empty Page into a Pdf document using Aspose.PDF Java for Python, simply invoke InsertEmptyPage class.

Python Code


doc= self.Document()
pdf_document = self.Document()
pdf_document=self.dataDir + 'input1.pdf'

# insert a empty page in a PDF
pdf_document.getPages().insert(1)

# Save the concatenated output file (the target document)
pdf_document.save(self.dataDir + "output.pdf")

print "Empty page added successfully!"

Download Running Code

Download Insert an Empty Page (Aspose.PDF) from any of the below mentioned social coding sites: