You switched the color bars. Try: java.awt.Image image = code128.createAwtImage(Color.BLACK,Color.WHITE);
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Fredrik Frost > Sent: Thursday, February 23, 2006 11:49 AM > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] createAwtImage bug? > > Hello > > My name is Fredrik and I am using the itext package in a > project that needs > codebar generation. > > When I use the barcode128 class to generate a barcode in a > pdf file it works > great, however when I use the createAwtImage class to > generate a barcode as > a java.awt.Image the output image is different from the > com.lowagie.text.Image objekt previous generated. With this I > dont mean the > missing codebar numbers below the codebar but that the java.awt.Image > codebar itself differs. > > Perhaps there is something I have done wrong or perhaps I > have misunderstood > something (english is not my first language). > > To illustrate my problem I have attached a java file called > "Mod_ex_Chap0907.java" to this message. The class generated > by this file is > a modified version of the chap0907 class that creates a > barcode128 object > and create a pdf file. > > In my class I have also open up a JFrame with a JTextPane where the > java.awt.Image object (created by the createAwtImage method) > is inserted. > When executed the differens between the barcode in the > JTextPane and the > barcode in the pdf file is clearly seen. > > I would be grateful if you could enlight me of the solution to this > problem... > > With kindest regards > Fredrik > > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions