在 Python 中合并 PDF 文件
Contents
[
Hide
]
使用 Aspose.PDF Java for Python 合并 PDF 文件,只需调用 ConcatenatePdfFiles 类。
doc= self.Document()
pdf = self.Document()
pdf=self.dataDir + 'input1.pdf'
# Open the source document
pdf1 = self.Document()
pdf1=self.dataDir + 'input2.pdf'
# Add the pages of the source document to the target document
pdf1.getPages().add(pdf1.getPages())
# Save the concatenated output file (the target document)
doc.save(self.dataDir + "Concatenate_output.pdf")
print "New document has been saved, please check the output file"
下载运行代码
下载\u0412\u00A0Concatenate PDF Files (Aspose.PDF)\u0412\u00A0 来自\u0412\u00A0 以下提到的任何社交代码站点: