Получение конкретной страницы в PDF-файле на Python
Contents
[
Hide
]
Чтобы получить конкретную страницу в PDF‑документе, используя Aspose.PDF Java for Python, просто вызовите класс GetPage.
doc= self.Document()
pdf = self.Document()
pdf=self.dataDir + 'input1.pdf'
# get the page at particular index of Page Collection
pdf_page = pdf.getPages().get_Item(1)
# create a new Document object
new_document = self.Document()
# add page to pages collection of new document object
new_document.getPages().add(pdf_page)
# save the newly generated PDF file
new_document.save(self.dataDir + "output.pdf")
print "Process completed successfully!
Скачать исполняемый код
Скачайте Get Page (Aspose.PDF) с любого из перечисленных ниже сайтов для совместной разработки: