2016-01-21 17 views
0

我使用Apache FOP API中的XSL模板從XML生成PDF文檔。我的應用程序需要動態生成PDF文檔。PDF可訪問性|在使用XSL-FO生成PDF時,Acrobat Pro中的「標題 - 失敗」錯誤

儘管添加標題(下面的代碼片段),我得到「標題 - 失敗」的以Adobe Acrobat檢查時輔助功能(全面檢查)臨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> 
+0

您使用哪種FOP版本?你的'fo:layout-master-set'和第一個'fo:page-sequence'之間的'fo:declarations'是什麼? –

+0

FOP版本1.1&是的,我在您提到的標記塊之間進行聲明。 – kek

+0

我出來的想法,因爲我擁有的唯一信息是http://xmlgraphics.apache.org/fop/1.1/metadata.html,你似乎也從這個工作。 –

回答

0

Adob​​e Acrobat中的錯誤。如果我轉到文件 - >屬性 - >初始視圖 - >在顯示中選擇'文檔標題',錯誤是固定的。但是我無法找到任何可以以編程方式執行相同的事情,無論是在XSL模板還是在java代碼中。

0

它看起來像這個問題已被修復,可能在版本2.1。在使用1.1版本時出現同樣的問題後,我剛剛升級到FOP 2.2,並且我很高興地報告,在Adobe Acrobat XI Pro中打開動態生成的PDF-UA文件後,所有內容都可以正常工作。

相關問題