beppecosta wrote:
I've rebuilt the jar with 1.4.8 sources + the Barcode.java from cvs.
Just to make sure that I'm not using the wrong jar I called it 1.4.8.1; I've
tried with some ink spread but the barcode still looks the same.

It works for me.
Have a look at the code sample and PDF in attachment.
I changed the version to 1.4.8x
br,
Bruno
package test;

import java.io.FileOutputStream;
import java.io.IOException;

import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.Barcode128;
import com.lowagie.text.pdf.PdfContentByte;
import com.lowagie.text.pdf.PdfWriter;

public class BarcodeTest {
        public static void main(String[] args) {
                Document document = new Document();
                try {
                        PdfWriter writer = PdfWriter.getInstance(document, new 
FileOutputStream("barcode_test.pdf"));
                        document.open();
                        PdfContentByte cb = writer.getDirectContent();
                        document.add(new Paragraph("Barcode 128"));
                        Barcode128 code128;
                        code128 = new Barcode128();
                        code128.setCode("0123456789 hello");
                        document.add(code128.createImageWithBarcode(cb, null, 
null));
                        code128 = new Barcode128();
                        code128.setCode("0123456789 hello");
                        code128.setInkSpreading(0.2f);
                        document.add(code128.createImageWithBarcode(cb, null, 
null));
                        code128 = new Barcode128();
                        code128.setCode("0123456789 hello");
                        code128.setInkSpreading(0.5f);
                        document.add(code128.createImageWithBarcode(cb, null, 
null));
                } catch (IOException e) {
                        e.printStackTrace();
                } catch (DocumentException e) {
                        e.printStackTrace();
                }
                document.close();               
        }
}

Attachment: barcode_test.pdf
Description: Adobe PDF document

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to