Am 09.01.2017 um 03:18 schrieb Shivangi Singal:
Hello ,

We have a project requirement where we need to display a label which consists 
of some text and a barcode . We don't want to display barcode as an buffered 
image but generate barcode may be using barcode font . I am not able to find 
any references in the examples as to if PDFBox has any way to add barcodes in 
pdf without being a image . I would really appreciate your help in the same .

Then get a barcode font. You can draw that one like any text. Usually this is done like this: *12345* , the "*" is for the beginning and end. Be careful to leave enough space before and after the barcode.

Don't forget to embed the font. (See the embeddedfonts.java example)

A completely different alternative would be to draw the barcode as vector graphics. There's no example for this yet AFAIK.

Tilman


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to