【问题标题】:Put a link in a PDF file with xsl-fo使用 xsl-fo 在 PDF 文件中添加链接
【发布时间】:2016-09-06 21:35:58
【问题描述】:

我使用FOP XSL-FO Anchor 的答案中给出的代码在我的 xsl-fo 代码生成的 PDF 文件中放置了一个链接。我使用的代码是

<fo:table-row font-size="8pt">
  <fo:table-cell text-align="left" number-columns-spanned="12" padding-left="0.1cm" padding-top="0.1cm" border-left="0.50pt solid black" border-right="0.50pt solid black"  >                       
    <fo:block>
        <fo:basic-link 
            external-destination="url('http://www.moga.mo.gov/mostatutes/stathtml/26000003921.html)" 
            color="blue" text-decoration="underline">
             http://www.moga.mo.gov/mostatutes/stathtml/26000003921.html
       </fo:basic-link> 
    </fo:block>
  </fo:table-cell>
</fo:table-row>

PDF文件中生成的链接是

file:///C:/Users/pondek/Appdata/Local/Microsoft/Windows/Temporary%20Internet%20Files/Content.IE5/NJ1Y1AFR/'http://www.moga.mo.gov/mostatutes/stathtml/26000003921.html

我不知道这是否重要,但我在使用 Windows 7Professional 的 PC 上使用 Rad 8.5。任何帮助将不胜感激!

【问题讨论】:

    标签: xml pdf xslt


    【解决方案1】:

    我没有结束结尾的 '.应该是的

    external-destination="url('http://www.moga.mo.gov/mostatutes/stathtml/26000003921.html')"  
    

    而不是

    external-destination="url('http://www.moga.mo.gov/mostatutes/stathtml/26000003921.html)"
    

    【讨论】:

      猜你喜欢
      • 2017-11-21
      • 2011-10-09
      • 2010-09-18
      • 1970-01-01
      • 2013-01-14
      • 1970-01-01
      • 2010-11-09
      • 1970-01-01
      • 2017-06-02
      相关资源
      最近更新 更多