You'll need to create a new Barcode128 class with a new getRawText(). Look 
at the source.

Paulo

----- Original Message ----- 
From: "Bruno Waes" <[EMAIL PROTECTED]>
To: "Post all your questions about iText here" 
<itext-questions@lists.sourceforge.net>
Sent: Tuesday, January 29, 2008 8:27 AM
Subject: Re: [iText-questions] Rather complex shipping slip


> On Jan 24, 2008 12:44 PM, Paulo Soares <[EMAIL PROTECTED]> wrote:
>
>> You have everything needed in Barcode128.java, look at getRawText().
>>
>
> Would this be the way to do it ? -- it generates a barcode but looks
> different from the one i generated with 'barbecue' (that nativly supports
> the B type, but barcode really messes up when running in headless mode)
>
>    public Barcode128 createITextBarcode(Order order, int page){
>
>    Barcode128 bc = new Barcode128();
>    bc.setCodeType(Barcode128.CODE128_RAW);
>    String userValue = createBarcodeString(order, page);
>    String text = Barcode128.START_B + userValue;
>        int chk = text.charAt(0);
>        for (int k = 1; k < text.length(); ++k)
>            chk += k * text.charAt(k);
>        chk = chk % 103;
>        text += (char)chk;
>        char stopChar = 106;
>        text += stopChar;
>    String rawText = Barcode128.getRawText(text, false);
>    rawText += '\uffff' + userValue;
>    bc.setCode(rawText);
>
>    return bc;
>    }
>
>
>
>>
>> Paulo
>>
>> > -----Original Message-----
>> > From: [EMAIL PROTECTED]
>> > [mailto:[EMAIL PROTECTED] On
>> > Behalf Of Bruno Waes
>> > Sent: Thursday, January 24, 2008 8:54 AM
>> > To: Post all your questions about iText here
>> > Subject: Re: [iText-questions] Rather complex shipping slip
>> >
>> >
>> >
>> > On Jan 22, 2008 6:39 PM, Paulo Soares <[EMAIL PROTECTED]> wrote:
>> >
>> >
>> >
>> >       > specs: (only in nl or fr, sorry)
>> >       >
>> > http://www.post.be/site/nl/letters/management/masspost/bar_kil
>> >       > opost_nl.pdf
>> >       > http://www.post.be/site/nl/letters/management/masspost/bar_kil
>> >       > opost_fr.pdf
>> >       >
>> >       > they talk about "UPU 128 B HR" format (some
>> >       > http://www.upu.int standard) ... i d guess that would be
>> >       > Barcode128, but when i generate a test example
>> >
>> >
>> >
>> >       That's Barcode128 but they have the restriction that
>> > the code must start
>> >       with the B marker. Currently iText optimizes the
>> > barcode size and may
>> >       have another markers. This is in my to-do list but I
>> > don't know when it
>> >       will be ready.
>> >
>> >
>> >
>> >
>> > Yes they have a startcode B (ascii value 104), the value, a
>> > checksum (modulo of 103) thats not visible in the human
>> > readable part, and an endcode (ascii value 106).
>> >
>> > There are any low level classes i can use to start from ? Or
>> > any alternative java ways of creating barcodes that can be
>> > recommended ?
>> >
>> > thanks,
>> > bruno


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to