If you are creating the form field use an external font, like Arial.ttf, with the encoding "Cp1251" and it will work.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Leonid Kleiner > Sent: Monday, May 30, 2005 11:58 AM > To: [email protected] > Subject: Re: [iText-questions] Russian as TextBox value > > Which font do you use in TextBox field? > I got squares in text box. > > ----- Original Message ----- > From: "Paulo Soares" <[EMAIL PROTECTED]> > To: "Leonid Kleiner" <[EMAIL PROTECTED]>; > <[email protected]> > Sent: Monday, May 30, 2005 11:30 AM > Subject: RE: [iText-questions] Russian as TextBox value > > > > The correct code is: > > > > PdfReader reader = new PdfReader("c:/demo_ru.pdf"); > > PdfStamper stamp = new PdfStamper(reader, > > new FileOutputStream("c:/filled_demo_ru2.pdf")); > > AcroFields form = stamp.getAcroFields(); > > String s = "\u0414\u0416"; > > form.setField("ruvalue", s); > > stamp.close(); > > > > However it will only work if the font field is defined as a > single byte > > one. Full Unicode fonts in fields are still not supported in iText. > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On > > > Behalf Of Leonid Kleiner > > > Sent: Monday, May 30, 2005 11:25 AM > > > To: [email protected] > > > Subject: Re: [iText-questions] Russian as TextBox value > > > > > > Yes > > > It is TextBox form value > > > > > > PdfReader reader = new PdfReader("c:/demo_ru.pdf"); > > > PdfStamper stamp = new PdfStamper(reader, > > > new FileOutputStream("c:/filled_demo_ru2.pdf")); > > > AcroFields form = stamp.getAcroFields(); > > > String s = "\u0414\u0416"; > > > byte b[] = s.getBytes("Cp1251"); > > > s = new String(b, "Cp1252"); > > > form.setField("ruvalue", s); > > > stamp.close(); > > > > > > ----- Original Message ----- > > > From: "Paulo Soares" <[EMAIL PROTECTED]> > > > To: "Leonid Kleiner" <[EMAIL PROTECTED]>; > > > <[email protected]> > > > Sent: Monday, May 30, 2005 11:03 AM > > > Subject: RE: [iText-questions] Russian as TextBox value > > > > > > > > > > Is it content, field, what? > > > > > > > > > -----Original Message----- > > > > > From: [EMAIL PROTECTED] > > > > > [mailto:[EMAIL PROTECTED] On > > > > > Behalf Of Leonid Kleiner > > > > > Sent: Sunday, May 29, 2005 10:40 AM > > > > > To: [email protected] > > > > > Subject: [iText-questions] Russian as TextBox value > > > > > > > > > > Hello > > > > > > > > > > Can I insert text in encoding other than Latin (e.g Russian) > > > > > into pdf TextBox using iText? I suppose that font of TextBox > > > > > should match the encoding. > > > > > Example : > > > > > String s = "some russian text"; byte b[] = > > > > > s.getBytes("Cp1251"); String latin = new String(b, "Cp1252"); > > > > > doesn't work. > > > > > > > > > > Thanks in advance, > > > > > Leonid > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.Net email is sponsored by Yahoo. > > > > Introducing Yahoo! Search Developer Network - Create apps > > > using Yahoo! > > > > Search APIs Find out how you can build Yahoo! directly > into your own > > > > Applications - visit > > > http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > > > > _______________________________________________ > > > > iText-questions mailing list > > > > [email protected] > > > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by Yahoo. > > > Introducing Yahoo! Search Developer Network - Create apps > using Yahoo! > > > Search APIs Find out how you can build Yahoo! directly > into your own > > > Applications - visit > > > http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > > > _______________________________________________ > > > iText-questions mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by Yahoo. > > Introducing Yahoo! Search Developer Network - Create apps > using Yahoo! > > Search APIs Find out how you can build Yahoo! directly into your own > > Applications - visit > http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > > _______________________________________________ > > iText-questions mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit > http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
