The awt image must be scaled externaly to be useful. The x scaling is not there because you can't have half pixels.
----- Original Message ----- From: "Chris Dail" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Tuesday, October 25, 2005 9:34 PM Subject: [iText-questions] Barcode Image sizes > I'm trying to create Barcode images using the Barcode.createAwtImage() > method on the Barcode class. I try to test the resulting image against the > same code created using the Barcodes.java example document. I want to be > able to create the same barcode using createAwtImage() as would be produced > by createImageWithBarcode(). > > The problem is that the barcode that is created is using createAwtImage() is > a bit larger than the code created when it is run through the iText image > creation. After some careful examination, it looks to be about 80% too big. > > I did some digging in the iText source code and found that the > createAwtImage() does not apply the "x" factor (minimum bar width) of the > barcodes. Is it supposed to work like this? I would think that this would > produce a barcode that could not be properly read. Is this a known issue and > how can I get around this. > > Here is the code for what I am trying to use: > Barcode barcode = new Barcode(); > barcode.setBarHeight(Integer.parseInt(barHeight)); > barcode.setCode(code); > Image image = barcode.createAwtImage(Color.black, Color.white); > > Thanks > > Chris Dail > Whitehill Technologies, Inc. > ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
