Please ignore my email about what font to use for Vietnamese. I
already got it
Hi, yes I did read all your replies and yes you did answer most of
them pertaining to the pure java code only, not the xml and tagmap
part :). Actually I managed to make it work for both Chinese and
Vietnamese fonts. But they were all in java code. Like (e.g. for
Vietnamese)
BaseFont bfVietnamese =
BaseFont.createFont("c:/windows/fonts/Tahoma.ttf", "Identity-H",
BaseFont.NOT_EMBEDDED);
Font FontVietnamese = new Font(bfVietnamese, 12,
Font.NORMAL);
Paragraph chunk = new Paragraph(VIETNAMES_SYMBOLS_HERE,
FontVietnamese);
document.add(chunk);
But then this code when I use xml and tagmap
Generating xml to pdf
PdfWriter writer = PdfWriter.getInstance(document, new
FileOutputStream("clvbill_pdf.pdf"));
XmlParser.parse(document, new FileInputStream("test.xml"),
"tagmap.xml");
Generating xml first
PrintWriter write = new PrintWriter(new OutputStreamWriter(new
FileOutputStream("test.xml")));
ResourceBundle rb = ResourceBundle.getBundle("LanguageBundle",
new Locale("VI"));
write.println("<?xml version=\"1.0\"
encoding=\"Identity-H\"?>");
write.println("<!DOCTYPE ITEXT SYSTEM
\"http://www.lowagie.com/iText/itext.dtd\">");
write.println("<body>");
write.println("\n\n");
write.println("<pdftable><pdftr><pdftd>");
write.println("<font face=\"c:/windows/fonts/tahoma.ttf\"> " +
rb.getString("statement.of.account.label")+ "</font>");
write.println("</pdftd></pdftr></pdftable>");
write.println("</body>");
write.close();
When compiling that it always gives me the Exception :
ExceptionConverter: java.io.UnsupportedEncodingException: Identity-H
Hence I sent attachments before so you could see the error.
Any thoughts about this? :) thanks
Mark
-----Original Message-----
From: Paulo Soares [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 3:53 AM
To: Mark Goking
Subject: Re: [iText-questions] Adding square root symbol to pdf
Did you read any of my replies? I've answered all this before.
Best Regards,
Paulo Soares
----- Original Message -----
From: "Mark Goking" <[EMAIL PROTECTED]>
To: "Paulo Soares" <[EMAIL PROTECTED]>
Sent: Thursday, July 17, 2003 14:17
Subject: RE: [iText-questions] Adding square root symbol to pdf
Hi paolo, I don’t mean to be pessimistic or something but my chinese
and vietnamese symbols worked when I coded them in pure java language.
Whatever combination I did using xml and tagmap it never worked. The
chinese symbols were worse because nothing appeared compared to
vietnamese as only some characters are not displayed but others are.
And you were right. Sorry but the files are not saved as utf-8 it was
after I sent those emails that I found out about it
And I did try using the chinese example using its font from
iTextAsian.jar. It worked but using all java source code getting it
from a ResourceBundle. But there is no font for vietnamese.
Im attaching three files. They're not really big. I just made a sample
application that will read a simple chinese phrase. If this will work
then ill be doing the modifications later. I hope youll have the time
to at least check and see which part im doing wrong. The source code
is small
Hope to hear from you
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions