📄 fop-extension-demo.fo
字号:
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="sans-serif" font-size="10pt">
<fo:layout-master-set>
<fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="0.4cm" margin-left="2cm" margin-right="2cm">
<fo:region-body margin-bottom="2.3cm"/>
<fo:region-after extent="2.2cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4" language="en">
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center" font-style="italic">
This PDF was generated using
Barcode4J (<fo:basic-link external-destination="url(http://barcode4j.krysalis.org)">http://barcode4j.krysalis.org</fo:basic-link>)
and Apache FOP (<fo:basic-link external-destination="url(http://xmlgraphics.apache.org/fop)">http://xmlgraphics.apache.org/fop</fo:basic-link>)
</fo:block>
<fo:block text-align="end">
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="#page-number:000#">
<bc:code39>
<bc:height>1cm</bc:height>
<bc:human-readable>top</bc:human-readable>
</bc:code39>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block font-weight="bold" font-size="16pt" space-after="5mm">FOP extension example</fo:block>
<fo:block>This document demonstrates the FOP extension for Barcode4J.</fo:block>
<fo:block>Some simple examples:</fo:block>
<fo:block space-before="3mm">
<fo:table table-layout="fixed" width="100%" border-collapse="separate">
<fo:table-column column-width="3.5cm"/>
<fo:table-column column-width="4cm"/>
<fo:table-column column-width="4.5cm"/>
<fo:table-column column-width="5cm"/>
<fo:table-header>
<fo:table-row background-color="blue" color="white">
<fo:table-cell padding-top="1mm" padding-bottom="1mm">
<fo:block>render-mode</fo:block>
</fo:table-cell>
<fo:table-cell padding-top="1mm" padding-bottom="1mm" text-align="center">
<fo:block>PostNet</fo:block>
</fo:table-cell>
<fo:table-cell padding-top="1mm" padding-bottom="1mm" text-align="center">
<fo:block>Code39</fo:block>
</fo:table-cell>
<fo:table-cell padding-top="1mm" padding-bottom="1mm" text-align="center">
<fo:block>EAN-13</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<fo:table-row>
<fo:table-cell display-align="center" padding-top="1mm" padding-bottom="1mm">
<fo:block>default</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center" text-align="center" padding-top="1mm" padding-bottom="1mm">
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="1234">
<bc:postnet/>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" padding-top="1mm" padding-bottom="1mm">
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="603716A64622">
<bc:code39>
<bc:human-readable>top</bc:human-readable>
</bc:code39>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" padding-top="1mm" padding-bottom="1mm">
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="4194586705506+07">
<bc:ean-13>
<bc:human-readable>top</bc:human-readable>
</bc:ean-13>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell number-columns-spanned="4" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>Some notes about the render-mode attribute:</fo:block>
<fo:block font-style="italic" font-size="8pt">For FOP 0.20.5 this defaults to "svg".</fo:block>
<fo:block font-style="italic" font-size="8pt">For FOP post-0.20.5 this defaults to "native".</fo:block>
<fo:block font-style="italic" font-size="8pt">For FOP 0.91 and later this defaults to "native".</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell display-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>svg</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center" text-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="1234" render-mode="svg">
<bc:postnet/>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="603716A64622" render-mode="svg">
<bc:code39>
<bc:human-readable>top</bc:human-readable>
</bc:code39>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="4194586705506+07" render-mode="svg">
<bc:ean-13>
<bc:human-readable>top</bc:human-readable>
</bc:ean-13>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell display-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>native</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center" text-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="1234" render-mode="native">
<bc:postnet/>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="603716A64622" render-mode="native">
<bc:code39>
<bc:human-readable>top</bc:human-readable>
</bc:code39>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="4194586705506+07" render-mode="native">
<bc:ean-13>
<bc:human-readable>top</bc:human-readable>
</bc:ean-13>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell display-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>g2d</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center" text-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="1234" render-mode="g2d">
<bc:postnet/>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
<fo:block>
<fo:instream-foreign-object>
<bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns" message="603716A64622" render-mode="g2d">
<bc:code39>
<bc:human-readable>top</bc:human-readable>
</bc:code39>
</bc:barcode>
</fo:instream-foreign-object>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" border-bottom="solid 1pt" padding-top="1mm" padding-bottom="1mm">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -