This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IReport and Barcode on PDF Output

 
Steve Dyke
Ranch Hand
Posts: 1679
1
  • Mark post as helpful
  • send pies
  • 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.
 
Vinod K Singh
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • 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.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The iText library also supports barcodes.
 
Steve Dyke
Ranch Hand
Posts: 1679
1
  • Mark post as helpful
  • send pies
  • 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: 42968
73
  • Mark post as helpful
  • send pies
  • 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: 1679
1
  • Mark post as helpful
  • send pies
  • 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: 42968
73
  • Mark post as helpful
  • send pies
  • 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: 1679
1
  • Mark post as helpful
  • send pies
  • 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: 42968
73
  • Mark post as helpful
  • send pies
  • 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: 1679
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for all your responses. In a lot of this Java jungle I am clueless.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic