PDF 可访问性 |使用 XSL-FO 生成 PDF 时 Acrobat Pro 中出现“标题 - 失败"错误
我正在使用 Apache FOP API 中的 XSL 模板从 XML 生成 PDF 文档.我的应用程序需要动态生成 PDF 文档.
I am generating a PDF document from an XML using XSL template in Apache FOP API. My applications requires the PDF documents to be generated dynamically.
尽管添加了标题(下面的代码片段),但在 Adobe Acrobat Pro 11 中检查辅助功能(完整检查)时仍收到标题 - 失败"错误.
Despite of adding the title (code snippet below), I am getting 'Title - Failed' error when checked for Accessibility (full check) in Adobe Acrobat Pro 11.
<fo:declarations>
<x:xmpmeta xmlns:x="adobe:ns:meta/">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
<!-- Dublin Core properties go here -->
<dc:title>Document title</dc:title>
<dc:creator>Document author</dc:creator>
<dc:description>Document subject</dc:description>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/">
<!-- XMP properties go here -->
<xmp:CreatorTool>Tool used to make the PDF</xmp:CreatorTool>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
</fo:declarations>
在 Adobe Acrobat 中,如果我转到文件 --> 属性 --> 初始视图 --> 在显示中选择文档标题",则错误已修复.但是我找不到任何以编程方式做同样事情的东西,无论是在 XSL 模板还是在 Java 代码中.
In Adobe Acrobat If I go to File --> Properties --> Initial View --> Select 'Document Title' in Show, the error is fixed. But I am not able to find anything to do the same thing programmatically, neither in XSL template nor in java code.