<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
<document>
  <header>
    <title>Instructions for the Apache FOP extension</title>
    <authors>
      <person id="jmaerki" name="<NAME>" email="<EMAIL>"/>
    </authors>
  </header>
  <body>
    <section>
      <title>Introduction</title>
      <p>
        This page describes how to generate barcodes within an XSL-FO document with that is
        processed with <fork href="ext:fop">Apache FOP</fork>.
      </p>
    </section>
    <section>
      <title>Setting up the barcode extension with Apache FOP 0.93 or later</title>
      <p>To setup the barcode extension, do the following:</p>
      <ul>
        <li>
          Add <code>barcode4j.jar</code> and <code>barcode4j-fop-ext.jar</code> to the
          <link href="../faq.html#classpath">classpath</link>.
        </li>
        <li>
          Alternatively, you can use the combined JAR:
          <code>barcode4j-fop-ext-complete.jar</code> which combines both
          <strong>Barcode4J</strong> and the FOP extension.
        </li>
      </ul>
    </section>
    <section>
      <title>Setting up the barcode extension with Apache FOP 0.20.5</title>
      <p>To setup the barcode extension, do the following:</p>
      <ul>
        <li>
          Add <code>barcode4j.jar</code> and <code>barcode4j-fop-ext-0.20.5.jar</code> to the
          <link href="../faq.html#classpath">classpath</link>.
        </li>
        <li>
         Alternatively, you can use the combined JAR:
          <code>barcode4j-fop-ext-0.20.5-complete.jar</code> which combines both
          <strong>Barcode4J</strong> and the FOP extension.
        </li>
        <li>
          <strong>Important:</strong> When you use FOP 0.20.5 together with
          <strong>Barcode4J</strong>, make sure you use the version of Avalon Framework that comes with
          <strong>Barcode4J</strong> (or the latest release of
          <fork href="ext:avalon">Avalon Framework</fork>). The version from FOP 0.20.5
          is slightly out-of-date.
        </li>
      </ul>
    </section>
    <section>
      <title>Using the barcode extension for Apache FOP</title>
      <p>This package contains an extension for <jump href="ext:fop">Apache FOP</jump> for
        generating barcodes.
      </p>
      <p>
        The barcode extension is tied to the follwing namespace:
        <strong><code>http://barcode4j.krysalis.org/ns</code></strong>
      </p>
      <p>
        To create a barcode the <link href="barcode-xml.html">Barcode XML</link> can be used within fo:instream-foreign-object elements.
      </p>
      <p>Here's an example (XSL-FO snippet):</p>
      <source><![CDATA[<fo:block>
  <fo:instream-foreign-object>
    <barcode:barcode
          xmlns:barcode="http://barcode4j.krysalis.org/ns"
          message="my message" orientation="90">
      <barcode:code128>
        <barcode:height>8mm</barcode:height>
      </barcode:code128>
    </barcode:barcode>
  </fo:instream-foreign-object>
</fo:block>]]></source>
      <p>
        The attribute "orientation" specifies the orientation of the barcode in degrees. The 
        attribute is optional and if set must be one of the following values:
        0, 90, -90, 180, -180, 270, -270.
      </p>
    </section>
    <section>
      <title>Including FOP&#039;s <code>page-number</code> in Barcode Output</title>
      <p>
        FOP&#039;s page-number can be incorporated into barcode output.
        To incorporate the page-number into the barcode, insert
        <code>#page-number#</code> into your barcode message. For example,
        to insert a page number between <code>12345-</code> and <code>-6789</code>
        do the following:
      </p>
    <source>&#60;barcode:barcode
    xmlns:barcode="http://barcode4j.krysalis.org/ns"
    message="12345-#page-number#-6789"&#62;
  &#60;code39/&#62;
&#60;/barcode:barcode&#62;</source>
      <p>
        You can also use #page-number:{number-format}# where "{number-format}" is 
        the number format pattern supported by Java's 
        <fork href="http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html">java.text.DecimalFormat</fork>.
        This allows you to format page "<code>3</code>" as "<code>0003</code>" if you 
        need a constant number of characters in the barcode message. For this example,  
        you would use "#page-number:0000#" in the message.<commit_msg>Documentation for Unicode escape feature in the FOP extensions.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
<document>
  <header>
    <title>Instructions for the Apache FOP extension</title>
    <authors>
      <person id="jmaerki" name="<NAME>" email="<EMAIL>"/>
    </authors>
  </header>
  <body>
    <section>
      <title>Introduction</title>
      <p>
        This page describes how to generate barcodes within an XSL-FO document with that is
        processed with <fork href="ext:fop">Apache FOP</fork>.
      </p>
    </section>
    <section>
      <title>Setting up the barcode extension with Apache FOP 0.93 or later</title>
      <p>To setup the barcode extension, do the following:</p>
      <ul>
        <li>
          Add <code>barcode4j.jar</code> and <code>barcode4j-fop-ext.jar</code> to the
          <link href="../faq.html#classpath">classpath</link>.
        </li>
        <li>
          Alternatively, you can use the combined JAR:
          <code>barcode4j-fop-ext-complete.jar</code> which combines both
          <strong>Barcode4J</strong> and the FOP extension.
        </li>
      </ul>
    </section>
    <section>
      <title>Setting up the barcode extension with Apache FOP 0.20.5</title>
      <p>To setup the barcode extension, do the following:</p>
      <ul>
        <li>
          Add <code>barcode4j.jar</code> and <code>barcode4j-fop-ext-0.20.5.jar</code> to the
          <link href="../faq.html#classpath">classpath</link>.
        </li>
        <li>
         Alternatively, you can use the combined JAR:
          <code>barcode4j-fop-ext-0.20.5-complete.jar</code> which combines both
          <strong>Barcode4J</strong> and the FOP extension.
        </li>
        <li>
          <strong>Important:</strong> When you use FOP 0.20.5 together with
          <strong>Barcode4J</strong>, make sure you use the version of Avalon Framework that comes with
          <strong>Barcode4J</strong> (or the latest release of
          <fork href="ext:avalon">Avalon Framework</fork>). The version from FOP 0.20.5
          is slightly out-of-date.
        </li>
      </ul>
    </section>
    <section>
      <title>Using the barcode extension for Apache FOP</title>
      <p>This package contains an extension for <jump href="ext:fop">Apache FOP</jump> for
        generating barcodes.
      </p>
      <p>
        The barcode extension is tied to the follwing namespace:
        <strong><code>http://barcode4j.krysalis.org/ns</code></strong>
      </p>
      <p>
        To create a barcode the <link href="barcode-xml.html">Barcode XML</link> can be used within fo:instream-foreign-object elements.
      </p>
      <p>Here's an example (XSL-FO snippet):</p>
      <source><![CDATA[<fo:block>
  <fo:instream-foreign-object>
    <barcode:barcode
          xmlns:barcode="http://barcode4j.krysalis.org/ns"
          message="my message" orientation="90">
      <barcode:code128>
        <barcode:height>8mm</barcode:height>
      </barcode:code128>
    </barcode:barcode>
  </fo:instream-foreign-object>
</fo:block>]]></source>
      <p>
        The attribute "orientation" specifies the orientation of the barcode in degrees. The 
        attribute is optional and if set must be one of the following values:
        0, 90, -90, 180, -180, 270, -270.
      </p>
      <p>
        Some characters like RS (record separator) and GS (group separator) are sometimes required
        for certain applications but these characters are not valid XML characters and cannot be
        encoded. You can escape them by using Java's Unicode escaping syntax. To escape RS, you
        can write "\u001E". GS would be encoded as "\u001D" and so forth. If for some reason,
        you need to encode a string containing "\u" in your message, you will have to escape that
        using "\\u", i.e. the double backslash will be converted to a single backslash and the
        subsequent "u" is treated as a normal message character. It is an error to specify an
        incomplete escape sequence, i.e. "00\u012xsomething" will result in an error.
      </p>
    </section>
    <section>
      <title>Including FOP&#039;s <code>page-number</code> in Barcode Output</title>
      <p>
        FOP&#039;s page-number can be incorporated into barcode output.
        To incorporate the page-number into the barcode, insert
        <code>#page-number#</code> into your barcode message. For example,
        to insert a page number between <code>12345-</code> and <code>-6789</code>
        do the following:
      </p>
    <source>&#60;barcode:barcode
    xmlns:barcode="http://barcode4j.krysalis.org/ns"
    message="12345-#page-number#-6789"&#62;
  &#60;code39/&#62;
&#60;/barcode:barcode&#62;</source>
      <p>
        You can also use #page-number:{number-format}# where "{number-format}" is 
        the number format pattern supported by Java's 
        <fork href="http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html">java.text.DecimalFormat</fork>.
        This allows you to format page "<code>3</code>" as "<code>0003</code>" if you 
        need a constant number of characters in the barcode message. For this example,  
        you would use "#page-number:0000#" in the message.
{'fraction_non_alphanumeric': 0.1307896347684146, 'fraction_numerical': 0.02560701897571924, 'mean_word_length': 2.5921582997434958, 'pattern_counts': {'":': 0, '<': 269, '<?xml version=': 2, '>': 269, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5994247', 'n_tokens_mistral': 3256, 'n_tokens_neox': 3058, 'n_words': 906}