There are several ways of doing this. Your way works if you embedd the font
and use the start/stop character '*'. My last version, that is not yet
"official", supports barcodes without external fonts. Besides that, it has
the advantage that it gives you the final dimensions of the barcode, before
it's placed. The use for direct positioning is direct.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Sergio Lopez Rodriguez [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 20, 2002 15:22
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] Using different fonts and ... positioning
> text
> 
> I want to use CODE39 and Helvetica + positioning but i have problems to do
> it. 
> 1. Can i do sth like...?
>  
>         cb.beginText();
>  
>         BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA,
> BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
>         BaseFont bf_BARCODE =
> BaseFont.createFont("c:\\winnt\\fonts\\CODE39.TTF", BaseFont.CP1252,     
>  
> BaseFont.NOT_EMBEDDED);
>         cb.setFontAndSize(bf, 16);
>         cb.showTextAligned(cb.ALIGN_LEFT, "FASA MONTAJE 3", 100, 700, 0);
> 
>         cb.setFontAndSize(bf_BARCODE, 34);
>         cb.showTextAligned(cb.ALIGN_LEFT, "337636", posX1 + convertX(5),
> convertY(posY + 12), 0);
> 
>         cb.endText();
> 
> 2. Or, do i have to use PdfBarcode? In such a case, how can i use it?
>  
> Thanks
>  
> Sergio
> 
> -----------------------------------------------------------------------
> Este mensaje y los documentos, que en su caso, lleve anexos, pueden
> contener informacion confidencial y ataņe exclusivamente a las personas
> a las que va dirigido. Cualquier opinion en el contenida, es exclusiva de
> su autor y no representa necesariamente la opinion de AZERTIA.
> Si usted no es el destinatario de este mensaje, considerese advertido de
> que lo ha recibido por error y que cualquier uso, difusion o copia estan
> prohibidos legalmente. Si ha recibido este mensaje por error, le rogamos
> que nos lo comunique por la misma via o al telefono 93 207 55 11 y proceda
> a destruirlo inmediatamente.  
> 
> This email is confidential and intended solely for the use of the
> individual
> to whom it is addressed. Any views or opinions presented are solely those
> of the author and do not necessarily represent those of AZERTIA.
> If you are not the intended recipient, be advised that you have received
> this email in error and that any use, dissemination, forwarding, printing,
> or copying of this email is strictly prohibited.
> If you have received this email in error please notify it to AZERTIA
> by telephone on number +34 93 207 55 11.
> -----------------------------------------------------------------------
> 
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions

_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to