You can't merge with a non embedded font (mingliu).
 
Best Regards,
Paulo Soares


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dharmendra Thakur
Sent: Thursday, September 23, 2004 12:22 PM
To: Paulo Soares; [EMAIL PROTECTED]
Subject: [iText-questions] Re: itext

I m sending you the template pdf file and the fdf file which contains the data to be merged in the pdf file...
Can you tell me how to create chinese font. Which font name and encoding should I use in BaseFont.createFont function.....??
 
Thanx and Regards
Dharmendra
 
----- Original Message -----
Sent: Wednesday, September 22, 2004 9:21 PM
Subject: RE: itext

Are you sure you have a chinese font in the form? If you want you can send me the form and the fdf.
 
Best Regards,
Paulo Soares


From: Dharmendra Thakur [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 22, 2004 4:28 PM
To: [EMAIL PROTECTED]; Paulo Soares
Subject: itext

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.
You can choose your response as you wish but you have no control on consequence.
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.

Reply via email to