You are probably getting some other pdf. Change the text and see you get the 
same text in the pdf. By the way, the correct code 39 must be "*12345*". 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 29, 2005 12:23 PM
> To: Paulo Soares
> Subject: RE: [iText-questions] barre code using code39 font
> 
> 
> 
> 
> 
> Thanks to repling to my message
> am tying to use a extranl font with name code.ttf located in 
> winnt/fonts.
> whene the pdf file is rended in get my text in a other font
> below is my code:
> 
> 
> <%@ page import ="java.io.FileOutputStream"%>
> <%@ page import ="java.io.File"%>
> <%@ page import = "java.io.IOException" %>
> <%@ page import="com.lowagie.text.*" %>
> <%@ page import = "com.lowagie.text.pdf.PdfWriter" %>
> <%@ page import = "com.lowagie.text.pdf.PdfContentByte" %>
> <%@ page import = "com.lowagie.text.pdf.BaseFont" %>
> <%@ page import ="java.util.*"%>
> <%@ page import ="java.text.DateFormat"%>
> <%
> /**
>  * Using a True Type Font.
>  */
>         // step 1: creation of a document-object
>         Document document = new Document();
> 
> 
>             // step 2:
>             // we create a writer that listens to the document
>             // and directs a PDF-stream to a file
>             PdfWriter.getInstance(document, new
> FileOutputStream("C:\\Program Files\\Apache Software 
> Foundation\\Tomcat 5.0
> \\webapps\\myweb\\oracle\\me.pdf"));
> 
>             // step 3: we open the document
>             document.open();
> 
>             // step 4: we add content to the document
>             BaseFont bfComic =
> BaseFont.createFont("c:\\winnt\\Fonts\\CODE39.TTF", BaseFont.CP1252,
> BaseFont.NOT_EMBEDDED);
>             Font font = new Font(bfComic, 10);
>             String text1 = "111454545454";
>             document.add(new Paragraph(text1, font));
> 
> 
>         // step 5: we close the document
>         document.close();
> response.sendRedirect ("me.pdf");
> 
> %>
> 
> 
> 
> 
> 
> ------------------------------------
> 
> Smail Namiri
> C.N.S.S
> 
> 
> Tél :   21222547367
> Email : [EMAIL PROTECTED]
> 
> Ce message électronique est confidentiel et destiné uniquement aux
> individus cités ci-dessus. Si vous avez reçu cet e-mail par 
> erreur, nous
> vous prions de le supprimer immédiatement et nous notifier.
> 
> This e-mail is confidential and intended only for the above named
> individuals. If you have received this e-mail in error, 
> please delete it
> immediately and notify us accordingly.
> 
> 


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to