Jump to content
  • POSTNET barcode support

    Assigned User teodord
    CategoryBug report

    Issue moved from: https://sourceforge.net/tracker/index.php?func=detail&aid=1209554&group_id=64348&atid=507165


    Consult the original issue for attachments.


    [ 1044604 ] POSTNET barcode support


    Submitted By: Daren O - rckrll106

    Date Submitted: 2004-10-11 07:17

    Last Updated By: gt78 - Comment added

    Date Last Updated: 2004-10-13 02:24

    Number of Comments: 2

    Number of Attachments: 0


    Assigned To: Giulio Toffoli

    Priority: 5



    POSTNET barcode support


    Can support for POSTNET barcoding be added?


    I know barbeque is the main barcoding package for ireport but iText supports POSTNET. In addition, iText is already package so adding support for this doesn't seem that bad. I'm just not sure if you want to add it to BcImage or not.


    iText has recently added (to a beta - itext-paulo-139.jar) the functionality to return an awt image (for POSTNET). I'm able to return a BufferedImage with a little coding in a script of mine.


    BarcodePostnet iTextPostnet = new BarcodePostnet



    Image image = iTextPostnet.createAwtImage

    (Color.BLACK, Color.WHITE);

    image = new javax.swing.ImageIcon(image).getImage


    java.awt.image.BufferedImage bimage =

    new java.awt.image.BufferedImage(

    (image.getWidth(null) + 20), image.getHeight

    (null), java.awt.image.BufferedImage.TYPE_INT_ARGB);


    //we need to offset the barcode image (so the

    leading and trailing bars are not trimmed) by creating a

    rectangle in the background and placing the barcode in

    so many pixels.

    Graphics g = bimage.createGraphics();


    g.fillRect(0, 0, (image.getWidth(null) + 24),


    g.drawImage(image, 12,0, null);



    return bimage;


    - Note, I have only been able to print this image CORRECTLY with jasper by clipping the image. Retain appears correct in the jasper viewer until you print it and then it distorts.




    Date: 2004-10-13 02:24

    Sender: gt78SourceForge.net SubscriberProject Admin

    Logged In: YES



    Why don't suggest POSTNET to barbecue ?


    Date: 2004-10-13 02:21

    Sender: gt78SourceForge.net SubscriberProject Admin

    Logged In: YES



    Why don't suggest POSTNET to barbecue ?


    No Files Currently Attached

    User Feedback

    Recommended Comments

    Changed Resolution from Open to Fixed

    Changed Status from Assigned to Resolved

    Changed Assigned User from - to @teodord

    Hi,Postnet barcodes are supported through the Barcode4j component in JasperReports library.I hope this helps.Teodor
    Link to comment
    Share on other sites

  • Create New...