• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

IReport and Barcode on PDF Output

 
Ranch Hand
Posts: 2232
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone help me on the issue of putting a barcode on a PDF output. I cannot find a PDF font in the field properties to use for barcode.
 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use a barcode library e.g. Barbecue to generate the barcode and embed them as image in the report then export the report to PDF.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The iText library also supports barcodes.
 
Steve Dyke
Ranch Hand
Posts: 2232
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ulf Dittmer:
The iText library also supports barcodes.



Can you give me some direction on how to use this. Currently I generate my report to PDF using JasperReports. However, I cannot figure out how to change a text field to display as a barcode.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A number of code examples are part of the iText tutorial: http://itextdocs.lowagie.com/tutorial/objects/images/tiff/index.php
 
Steve Dyke
Ranch Hand
Posts: 2232
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ulf Dittmer:
A number of code examples are part of the iText tutorial: http://itextdocs.lowagie.com/tutorial/objects/images/tiff/index.php




I have looked at the examples but don't understand how to tie the iText to the servlet that I use to generate the JasperReport. Is the idea to create a barcode image of the desired text then send that as a prameter?
[ October 08, 2008: Message edited by: Steve Dyke ]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, I skipped over the JasperReports part. This page and especially this piece of code make it sound as if barcodes are actually part of Jasper already (or can be added easily).
[ October 08, 2008: Message edited by: Ulf Dittmer ]
 
Steve Dyke
Ranch Hand
Posts: 2232
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have similar examples using the Barbecue.jar since it is included with JasperReports? I have tried several combinations of syntax but can not figure out the code for the Image Expression
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I really don't know the first thing about the Barbecue library, and not much more about JasperReport.
 
Steve Dyke
Ranch Hand
Posts: 2232
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for all your responses. In a lot of this Java jungle I am clueless.
 
Get off me! Here, read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic