使用dompdf时,文档信息字典中可以设置哪些PDF元数据?
最初问 elsewhere :
Are you able to parse more META info to be added to PDF information during PDF generation?
/Creator (DOMPDF) /CreationDate (D:20150818031116-05'00') /ModDate (D:20150818031116-05'00')
Can you specify Author, Copyright, etc..?
I cannot find ANY reference to this. Only just saw your: Creator, Creation Date and Modification Date!
最佳答案
在当前的稳定版本 (0.6.1) 中,HTML <title>
元素和一些 <meta>
元素(作者、关键字、描述)用于设置相关的 PDF 元数据。
<html>
<head>
<title>Ehhhhhhh</title>
<meta name="author" content="Arthur Herbert Fonzarelli">
<meta name="keywords" content="fonzie, cool, ehhhhhhh">
</head>
<body>
<p>Ehhhhhhh</p>
</body>
</html>
此外,您可以使用
$dompdf->add_info()
方法向 PDF 添加其他信息。您可以设置的受支持元数据信息的完整列表是:标题、作者、主题、关键字、创建者、制作者、CreationDate、ModDate、Trapped。$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->add_info('Subject', 'Cool');
关于pdf-generation - dompdf 支持哪些 PDF 元数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32233664/