I got it !!
Because the original pdf is a one-page scanned image,
the barcode should be added only once. Now it's
perfect.
Thanks.
giuseppe.
--- bruno <[EMAIL PROTECTED]> ha scritto:
> beppe costagliola wrote:
>
> >Bruno,
> >
> >I know the dimension of the final barcode and I
> also
> >know its position because I always write it on the
> >same place.
> >
> Aha, that's makes it easier.
>
> >I also have to add some text beside the
> >barcode and the white rectangle should actually be
> a
> >little larger than the barcode.
> >
> >
> First you need to set the fill color.
> There's a plethora of methods to do this.
> You could for instance use:
> over.setColorFill(new Color(0xFF, 0xFF, 0xFF));
>
> Then you need to draw the rectangle:
> over.rectangle(50, 800, width, height);
>
> Then you need to fill and/or stroke the rectangle:
> over.fillStroke();
>
> It might be a good idea to but these three lines
> in a saveState() and restoreState() sequence,
> but that will cost you a few bytes.
>
> >this adds the barcode:
> >
> >Barcode128 code128 = new Barcode128();
> >code128.setCode("NT75214690");
> >PdfTemplate tp128=
> >code128.createTemplateWithBarcode(over, null,
> null);
> >over.addTemplate(tp128, 50, 800);
> >
> >
> The source code above is OK, but if you add the
> barcode only once, your previous sample with
> placeBarcode will save you a few bytes.
> br,
> Bruno
>
>
> _______________________________________________
> iText-questions mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/itext-questions
>
Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions