Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Barcode Support

  1. #1
    Join Date
    Nov 2010
    Posts
    3

    Question Barcode Support

    Hi there,

    I have a question regarding unsupported barcodes. Some of our customers use barcodes that are not supported by the simple barcodes in Pentaho (eg, data matrix). We used to use Stimulsoft for report printing and the way we deal with the same problem in Stimulsoft is that we install a special chip in the physical printer. The chip has a firmware installed on it and given a printer-specific control sequence, it is able to print the barcode as required. Then from Stimulsoft, we invoke a native method that is able to send the control sequence.

    Is Pentaho able to do the same thing? ie, does it also have a native method or some other special commands that allow us to talk to the printer directly?

    Also, if I install the ttf files myself, is it going to work?

    Many thanks,
    Judy
    Last edited by judy.zhu; 11-09-2010 at 05:22 PM.

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    We do not support to include non-standard codes in the printing output, as printing is done by the Java system and translated to the printer drivers own language by some magical (operating system dependent) means. And implanting a chip sounds weird too. We are not borg here

    If I would have to print data-matrix codes today, I would go and write the necessary glue code to fit in Barcode4J into the system. Heck, I might do that for the 4.0 release or just as a optional sideline item anyway - as it is easy and our current "Barbecue" barcode library seems to be a dead project.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Nov 2010
    Posts
    3

    Default

    Thanks for your help Taqua

    Could you please explain more on the "necessary glue code to fit in Barcode4J into the system"? I'm a bit confused here. Is pentaho using Barcode4J? What do I need to write this glue code? And if I do write this code, would I be able to inject it into Pentaho and use it the same way as the supported barcodes?

    Thanks,
    Judy
    Last edited by judy.zhu; 11-09-2010 at 07:23 PM.

  4. #4
    Join Date
    Nov 2010
    Posts
    3

    Default

    Does anyone have any idea? How do I inject Barcode4J into the system? If it doesn't work, could I use a ttf file? Please help... If we can't get this to work, we have to use another tool, like switching back to Stimulsoft...

    Many thanks,
    Judy

  5. #5
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Barcode4J is a java library. You will have to write JavaCode. You have two options: Either let Barcode4J generate a java.awt.Image for you (produces a raster image which looks bad on printing) or implement a Drawable implementation that then calls the Barcode4J Graphics2D outputter to render the image into a Graphics2D context.

    That is the core code.

    Then you may want to add additional code so that you get a "Barcode4J" element in the report designer with properly declared attributes and styles so that you can define that barcode element graphically. For that: Look at the SimpleBarcodeElement code in the pentaho-reporting-engine-classic-extensions module. This module contains the code for talking to "Barbecue" - a alternative Barcode provider. It should be rather trivial to adapt that code to use Barcode4J instead.

    I took the liberty to actually create a JIRA case for that issue. http://jira.pentaho.com/browse/PRD-3088

    For the future remember: If none of our users thinks the problem is important enough to create a JIRA case, then we (safely) assume it is not important for them to ask for a fix for it. In that cases we simply provide no fix, as there are hundreds of cases that are open and where people are passionate about it.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.