S
sumitra
Hello All,
I need to print out French characters
(ççÇÇààÀÀèèÈÈééÉÉ) in a PDF file by runningmy code on
Unix. I'm using iText to create the PDF. The configurations in iText
for the fonts include BaseFont.IDENTITY_H for encoding and
BaseFont.EMBEDDED.
The PDF encoding I have given is:
/BaseFont /Courier /Encoding /WinAnsiEncoding
which generates the PDFs with the French text fine on Windows. Should I
be changing this??
The problem is that with these parameters, on Unix, all I get is
garbled text in my pdf doc.
Compiling with -encoding ISO-8859-1 does not help because these French
values are picked up at run time from a Hashtable. I have checked the
Hashtable contents and they look good.
My code uses a lot of StringWriter() and I would like to know if I need
to explicitly set the encoding here to "8859_1" and if so, how?? I've
tried the ByteArrayOutputStream approach to replace the StringWriter
and wrapped that in OutputStreamWriter with the ecoding 8859_1. That
did not help.
I also tried the getBytes() method of StringWriter and tried to convert
it to another encoding, but that did not help too!!
I really am at a loss now as to how to resolve my problem.
If anyone out there has an idea do let me know please!
Thanks in advance.
--Sum
I need to print out French characters
(ççÇÇààÀÀèèÈÈééÉÉ) in a PDF file by runningmy code on
Unix. I'm using iText to create the PDF. The configurations in iText
for the fonts include BaseFont.IDENTITY_H for encoding and
BaseFont.EMBEDDED.
The PDF encoding I have given is:
/BaseFont /Courier /Encoding /WinAnsiEncoding
which generates the PDFs with the French text fine on Windows. Should I
be changing this??
The problem is that with these parameters, on Unix, all I get is
garbled text in my pdf doc.
Compiling with -encoding ISO-8859-1 does not help because these French
values are picked up at run time from a Hashtable. I have checked the
Hashtable contents and they look good.
My code uses a lot of StringWriter() and I would like to know if I need
to explicitly set the encoding here to "8859_1" and if so, how?? I've
tried the ByteArrayOutputStream approach to replace the StringWriter
and wrapped that in OutputStreamWriter with the ecoding 8859_1. That
did not help.
I also tried the getBytes() method of StringWriter and tried to convert
it to another encoding, but that did not help too!!
I really am at a loss now as to how to resolve my problem.
If anyone out there has an idea do let me know please!
Thanks in advance.
--Sum