Hi,
I try to convert XML file to PDF and content of XML file is UTF-8 using
Java and itext library.
Environment - Windows XP/Windows 2003
I prepared PDF file in Adobe LiteCycle Designer as Adobe form, added
fields, set them as ready only.
I used the sample of itext code to stamp content in the PDF file and
everything worked fine.
When I tried to do the same with Japanese characters, I got issues.
1. I used Arial font in the field, the code ran fine but content is not
displayed.
2. I modified the code and added
BaseFont bf = BaseFont.createFont("c:\\windows\\fonts\\msgothic.ttc,1",
BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
or
BaseFont bf = BaseFont.createFont("c:/windows/fonts/arialuni.ttf",
BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
(both fonts are present),
and
form1.setFieldProperty("who", "textfont", bf, null);
form1.setField("who", nodeValue);
the result - Japanese characters are not displayed.
3. I modified Adobe form and select Arial Uni or MS Gothic fonts but the
code fails , sending Document exception
Font 'KozMinPro-Regular' with 'UniJIS-UCS2-H' is not recognized..
Font 'HYSMyeongJoStd-Medium' with 'UniKS-UCS2-H' is not recognized..
4. I modified Adobe form and select Helvetica font - the code works
but Japanese characters are not displayed.
If there is no solution for this situation, I will create PDF file during
XML conversion if using stamping is issue.
Thanks,
Leonid Ziskind
----------------------------------------------------------------------------
This message and any included attachments are from Siemens Medical Solutions
and are intended only for the addressee(s).
The information contained herein may include trade secrets or privileged or
otherwise confidential information. Unauthorized review, forwarding, printing,
copying, distributing, or using such information is strictly prohibited and may
be unlawful. If you received this message in error, or have reason to believe
you are not authorized to receive it, please promptly delete this message and
notify the sender by e-mail with a copy to [EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/