user3273749
user3273749

Reputation: 1

How to create barcode in pdf

I want create a barcode using code 39 in pdf, can some one help how i can write jrhtml file to print the pdf

I have tried with below, but facing some problems with it. Is there any other approach which we can generate barcode using code39.

<componentElement>
    <reportElement x="353" y="42" width="200" height="50"/>
        <jr:Code39 xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components"    xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" textPosition="bottom">

            <jr:codeExpression>                 
                <![CDATA[$P{printid}]]>                     
            </jr:codeExpression>                
       </jr:Code39>
</componentElement>

Upvotes: 0

Views: 933

Answers (2)

glokem
glokem

Reputation: 31

Python, using reportlab and pyPdf is able to place code39 barcodes into documents. Here is a link to some example code.

You will need Python, with Reportlab, and pyPdf (the last two being Python libraries)

https://github.com/glokem/barcodepdf

Also, some of the 'snippet' codes included in that repo might be of use to you...?

Upvotes: 1

Shane Wealti
Shane Wealti

Reputation: 2342

Get a code 39 font and create a document using that font. http://www.barcodesinc.com/free-barcode-font/

Upvotes: 0

Related Questions