Python で PDF ファイルをマージする
Contents
[
Hide
]
Python と DOM を使用して PDF ファイルを結合する
2 つの PDF ファイルを連結するには:
- 新しい文書を作成します。
- PDF ファイルの結合
- 結合した文書を保存する
複数の PDF 文書を 1 つのファイルに結合:
import sys
import aspose.pdf as ap
from os import path
def merge_two_documents(infile1, infile2, outfile):
document1 = ap.Document(infile1)
document2 = ap.Document(infile2)
document1.pages.add(document2.pages)
document1.save(outfile)
ライブサンプル
Aspose.PDF 合併 は、プレゼンテーションのマージ機能がどのように機能するかを調べることができるオンラインの無料ウェブアプリケーションです。
