在 PHP 中设置 PDF 文件信息
Contents
[
Hide
]
Aspose.PDF - 设置 PDF 文件信息
要使用 Aspose.PDF Java for PHP 更新 PDF 文档信息,只需调用 SetPdfFileInfo 类。
PHP 代码
# Open a pdf document.
$doc = new Document($dataDir . "input1.pdf");
# Get document information
$doc_info = $doc->getInfo();
$doc_info->setAuthor("Aspose.PDF for java");
$doc_info->setCreationDate(new Date());
$doc_info->setKeywords("Aspose.PDF, DOM, API");
$doc_info->setModDate(new Date());
$doc_info->setSubject("PDF Information");
$doc_info->setTitle("Setting PDF Document Information");
# save update document with new information
$doc->save($dataDir . "Updated_Information.pdf");
print "Update document information, please check output file.";
下载运行代码
下载В **Set PDF File Information (Aspose.PDF)**В 来自В 以下提到的任何社交编码站点: