Barcode4J doesn't need any fonts to paint the barcodes. It contains all
the logic to create these barcodes. The only thing you need a font for
is the human-readable part. What's wrong with your FO-snippet is that
the font-name and font-size elements are in the wrong position and are
therefore ignored.

If you wanted to specify a font for the human-readble part it would have
to look this way:

        <fo:instream-foreign-object>
          <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns"; 
msg="1100007">
            <barcode:ean-8>
              <barcode:height>14mm</barcode:height>
              <barcode:human-readable>
                <barcode:font-name>sans-serif</barcode:font-name>
                <barcode:font-size>8pt</barcode:font-size>
              </barcode:human-readable>
            </barcode:ean-8>
          </barcode:barcode>
        </fo:instream-foreign-object>

I understand you want to have a broader barcode. In this case you should
play with the module-width element to adjust the width of the narrow
bars:

        <fo:instream-foreign-object>
          <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns"; 
msg="1100007">
            <barcode:ean-8>
              <barcode:height>14mm</barcode:height>
              <barcode:module-width>1mm</barcode:module-width>
            </barcode:ean-8>
          </barcode:barcode>
        </fo:instream-foreign-object>

Attached you find the PDF that resulted from the above two snippets.

On 14.12.2004 04:31:23 kumar Bandaru wrote:
> Hi,
>  
>   I got rid of the exceptions, but the follwing block is not rendering the 
> barcode in the PDF file.
>   Pls note that Iam using upceanm font given by IDAutomation.com.Does 
> Barcode4J support this font?? .
>  
>  
>  <fo:table-cell padding-left="5px" border="solid black 1 px" 
> border-collapse="collapse" number-columns-spanned="3">
>                                             <fo:block>
>                                               <fo:instream-foreign-object>
>                                                 <barcode:barcode 
> xmlns:barcode="http://barcode4j.krysalis.org/ns"; msg="1100007">
>                                                   <barcode:ean-8>
>                                                     
> <barcode:height>14mm</barcode:height>
>                                                     
> <barcode:font-name>upceanm</barcode:font-name>
>                                                     
> <barcode:font-size>20pt</barcode:font-size>
>                                                   </barcode:ean-8>
>                                                 </barcode:barcode>
>                                               </fo:instream-foreign-object>
>                                             </fo:block>
>                   </fo:table-cell>
> 
> Any suggestions are welcome.Thanks


Jeremias Maerki

Attachment: ean8.pdf
Description: Binary data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to