如何将pdf文件添加到xslt作为html

时间:2016-12-30 07:07:22

标签: xml pdf xslt xslt-1.0

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="tos">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">
    <fo:layout-master-set>
        <fo:simple-page-master master-name="A4">
            <fo:region-body/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="A4">
        <fo:flow flow-name="xsl-region-body">
            <fo:block-container>
                <fo:block>Hello W3Schools</fo:block>    
                </fo:block>
            </fo:block-container>
        </fo:flow>
    </fo:page-sequence>
                <fo:block><fox:external-document content-type="pdf" src="/system/attachments/documents/sample.pdf" width="425" height="355"/> //how to add pdf file like this
</fo:root>
</xsl:template>

</xsl:stylesheet>

我想在xslt页面中显示pdf文件,如html 实际如果我添加了附件,那么它将显示在我的xslt标签下面

0 个答案:

没有答案