| <?xml version="1.0" encoding="ISO-8859-1"?> |
| <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> |
| |
| <fo:layout-master-set> |
| <fo:simple-page-master master-name="first" |
| page-width="21cm" |
| page-height="29.7cm" |
| margin-top="5mm"> |
| <fo:region-body |
| margin-bottom="4.5in" |
| margin-right="5mm" |
| margin-left="5mm" |
| margin-top="5mm"/> |
| <fo:region-after |
| extent="4in" /> |
| </fo:simple-page-master> |
| |
| <fo:simple-page-master master-name="rest" |
| page-width="21cm" |
| page-height="29.7cm" |
| margin-right="5mm" |
| margin-left="5mm" |
| margin-top="5mm" |
| margin-bottom="5mm"> |
| <fo:region-body/> |
| </fo:simple-page-master> |
| |
| <fo:page-sequence-master master-name="A4"> |
| <fo:repeatable-page-master-alternatives> |
| <fo:conditional-page-master-reference master-reference="first" page-position="first"/> |
| <fo:conditional-page-master-reference master-reference="rest" page-position="rest"/> |
| <fo:conditional-page-master-reference master-reference="rest"/> |
| </fo:repeatable-page-master-alternatives> |
| </fo:page-sequence-master> |
| </fo:layout-master-set> |
| |
| <fo:page-sequence master-reference="A4"> |
| <fo:flow flow-name="xsl-region-body" font-size="12pt"> |
| |
| <fo:block font-size="14pt" font-weight="bold"> |
| Example embedding Font |
| </fo:block> |
| |
| <fo:block> |
| This example shows how to use an embedded font and |
| uses a free barcode font as an example. The barcode font is from |
| <fo:basic-link external-destination="http://www.geocities.com/keith_dimmock/">http://www.geocities.com/keith_dimmock/</fo:basic-link> |
| and is free. |
| </fo:block> |
| |
| <fo:block> |
| To generate the PDF from this example, set the following build parameters |
| (for example in build-local.properties) and run "build examples" from the |
| top-level FOP source code directory. |
| |
| <fo:block font-family="Courier" font-size="10pt" margin-left="2em"> |
| <fo:block>fo.examples.dir = ./examples/fo/advanced</fo:block> |
| <fo:block>fo.examples.include = **/barcode.fo</fo:block> |
| <fo:block>fo.examples.userconfig = examples/fo/advanced/bar.conf.xml</fo:block> |
| <fo:block>fo.examples.force = true</fo:block> |
| </fo:block> |
| </fo:block> |
| |
| <fo:block> |
| If the character encoding is correct in the generated PDF (bugzilla 5335), searching for "123456" should |
| find the first barcode, and "234567" the second. |
| </fo:block> |
| |
| <fo:block font-weight="bold" space-before.optimum="2em"> |
| First barcode: *ID123456* |
| </fo:block> |
| |
| <fo:block |
| font-family="Barcode" |
| font-size="74pt"> |
| *ID123456* |
| </fo:block> |
| |
| <fo:block> |
| normal text, follows first barcode. |
| </fo:block> |
| |
| <fo:block font-weight="bold" space-before.optimum="2em"> |
| Second barcode: *ID234567* and some text |
| </fo:block> |
| |
| <fo:block |
| font-family="Barcode, Helvetica" |
| font-size="74pt"> |
| *ID234567* and some text |
| </fo:block> |
| |
| <fo:block> |
| normal text, follows second barcode. |
| </fo:block> |
| |
| </fo:flow> |
| </fo:page-sequence> |
| </fo:root> |