|
Hi,
I am using itext(pdf toolkit) for our workflow
solution. I have a pdfdocument document with some textfields. User access it
through web and fills the detail in the text fields and submit to the server.
Now on server side we get the fdf data and we are already having the
pdftemplate. Now we are trying to merge the template and the fdf data.
Everything works very fine till we are working on english locale with english
font in pdfform elements but it does not work with the chinese font sent in
pdfform.
Please check the code snipplet:
Font font=new
Font("MingLiU",Font.PLAIN,12);
DefaultFontMapper dfm=new DefaultFontMapper(); BaseFont baseFont=dfm.awtToPdf(font); PdfReader reader = new
PdfReader(strTemplatePath);
PdfStamper stamp = new PdfStamper(reader, new FileOutputStream(strOutPDF)); PdfWriter
pdfWriter=stamp.getWriter();
PdfContentByte pdfContentByte=pdfWriter.getDirectContent(); pdfContentByte.setFontAndSize(baseFont,12); AcroFields form =
stamp.getAcroFields();
form.setFields(FDFInput); stamp.setFormFlattening(true); stamp.close(); Regards
Dharmendra Kr. Thakur
Newgen Software Technology Ltd. Okhla Phase - 1, New Delhi-20. Between stimulus and response, you are always
having a choice.
Disclaimer :- This e-mail message including any attachment may contain confidential, proprietary or legally privileged information. It should not be used by who is not the original intended recipient. If you have erroneously received this message, you are notified that you are strictly prohibited from using, coping, altering or disclosing the content of this message. Please delete it immediately and notify the sender. Newgen Software Technologies Ltd and / or its subsidiary Companies accept no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of Newgen Software Technologies Ltd
and / or its subsidiary Companies, as applicable.
You can choose your response as you wish but you have no control on consequence. |
