[#755] - POSTNET barcode support

Category:
Bug report
Priority:
Low
Status:
Assigned
Project: Severity:
Trivial
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

Issue moved from: https://sourceforge.net/tracker/index.php?func=detail&aid=1209554&group_...

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

Summary:
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
();
iTextPostnet.setCode(data);
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.setColor(Color.white);
g.fillRect(0, 0, (image.getWidth(null) + 24),
image.getHeight(null));
g.drawImage(image, 12,0, null);
g.setColor(Color.blue);
g.dispose();
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.

Comments

Date: 2004-10-13 02:24
Sender: gt78SourceForge.net SubscriberProject Admin
Logged In: YES
user_id=616744

Why don't suggest POSTNET to barbecue ?

Date: 2004-10-13 02:21
Sender: gt78SourceForge.net SubscriberProject Admin
Logged In: YES
user_id=616744

Why don't suggest POSTNET to barbecue ?

No Files Currently Attached

tcloonan's picture
593
Joined: Dec 22 2006 - 1:13am
Last seen: 12 years 2 months ago
Feedback
randomness