在 PHP 中向 PDF 文件插入空页

Aspose.PDF - 插入空页

要在 PDF 文档中插入空页,可使用 Aspose.PDF Java for PHP,只需调用 InsertEmptyPage 类。

PHP 代码


# Open the target document
$pdf = new Document($dataDir . 'input1.pdf');

# insert a empty page in a PDF
$pdf->getPages()->insert(1);

# Save the concatenated output file (the target document)
$pdf->save($dataDir . "output.pdf");

print "Empty page added successfully!";

下载运行代码

下载\u0412\u00A0插入空页面 (Aspose.PDF)\u0412\u00A0 来自\u0412\u00A0 以下列出的任何社交编码站点: