Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
-none-

-none-

2007-10-01       - By Paulo Soares

 Back
Now I got it. It's fixed in the SVN.

Paulo

-- -- Original Message -- --
From: "Jeff Metzner" <jmetzner@(protected)>
To: "Post all your questions about iText here"
<itext-questions@(protected)>
Sent: Monday, October 01, 2007 10:42 PM
Subject: Re: [iText-questions] Japanese checkboxes


> Hi Paulo,
>
>
>
> We are not trying to change the value of the checkbox to something that is
> not possible.
>
>
>
> Using this
>
>
>
> string[] strvaluearr;
>
> strvaluearr = pdfFormFields.GetAppearanceStates("JC");
>
>
>
> we got
>
>
>
>
>
>
>
> Which shows the list of possible values and the value we are trying to set
> is the first one in the list.
>
>
>
> Our Issue is
>
>
>
> We have a checkbox named "JC" on the pdf which has a Japanese value "$B$O$$
(B"
> and we are trying to get the checkbox to get checked by using the SetField
> as below.
>
>
>
> pdfFormFields.SetField("JC", "$B$O$$(B");
>
>
>
> This works fine for English values in the checkboxes, but no idea why this
> does not work for Japanese
>
>
>
> Let me know if you need any more information.
>
>
>
> -- --Original Message-- --
>
> From: itext-questions-bounces@(protected)
> [mailto:itext-questions-bounces@(protected)] On Behalf Of Paulo
> Soares
>
> Sent: Monday, October 01, 2007 3:51 PM
>
> To: Post all your questions about iText here
>
> Subject: Re: [iText-questions] Japanese checkboxes
>
>
>
> The possible checkbox values can't be changed. See the possible values
> with AcroFields.GetAppearanceStates().
>
>
>
> Paulo
>
>
>
> -- -- Original Message -- --
>
> From: "Jeff Metzner" <jmetzner@(protected)>
>
> To: "Post all your questions about iText here"
>
> <itext-questions@(protected)>
>
> Sent: Monday, October 01, 2007 8:19 PM
>
> Subject: Re: [iText-questions] Japanese checkboxes
>
>
>
>
>
>> Thanks.  A sample PDF is attached, and the code is below.
>
>>
>
>> private void createpdf()
>
>>
>
>>    {
>
>>
>
>>             //BaseFont.AddToResourceSearch("iTextAsian.dll");
>
>>
>
>>            //BaseFont.AddToResourceSearch("iTextAsianCmaps.dll");
>
>>
>
>>
>
>>
>
>>            //BaseFont font = BaseFont.CreateFont("STSong-Light",
>
>> "UniGB-UCS2-H", BaseFont.EMBEDDED);
>
>>
>
>>            BaseFont font =
>
>> BaseFont.CreateFont("c:\\windows\\fonts\\arialuni.ttf",
>
>> BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
>
>>
>
>>
>
>>
>
>>            PdfReader pdfReader = new PdfReader("C:\\JTEST.pdf");
>
>>
>
>>            PdfStamper pdfStamper = new PdfStamper(pdfReader, new
>
>> FileStream("C:\\DEL\\JTEST3.pdf", FileMode.Create));
>
>>
>
>>            AcroFields pdfFormFields = pdfStamper.AcroFields;
>
>>
>
>>
>
>>
>
>>            string strvalue;
>
>>
>
>>
>
>>
>
>>            strvalue = "This is English Text";
>
>>
>
>>            //pdfFormFields.SetFieldProperty(de.Key.ToString(),
>> "textfont",
>
>> font, null);
>
>>
>
>>            pdfFormFields.SetField("Text1", strvalue);
>
>>
>
>>
>
>>
>
>>            strvalue = "$B$$$$$((B";
>
>>
>
>>            pdfFormFields.SetFieldProperty("Text2", "textfont", font,
>
>> null);
>
>>
>
>>            pdfFormFields.SetField("Text2", strvalue);
>
>>
>
>>
>
>>
>
>>            strvalue = "Yes";
>
>>
>
>>            //pdfFormFields.SetFieldProperty(de.Key.ToString(),
>> "textfont",
>
>> font, null);
>
>>
>
>>            pdfFormFields.SetField("EC", strvalue);
>
>>
>
>>
>
>>
>
>>            strvalue = "$B$O$$(B";
>
>>
>
>>            pdfFormFields.SetFieldProperty("JC", "textfont", font, null);
>
>>
>
>>            pdfFormFields.SetField("JC", strvalue);
>
>>
>
>>
>
>>
>
>>            pdfStamper.FreeTextFlattening = true;
>
>>
>
>>            pdfStamper.FormFlattening = true;
>
>>
>
>>
>
>>
>
>>            pdfStamper.Close();
>
>>
>
>>            pdfReader.Close();
>
>>
>
>>
>
>>
>
>>            Response.BufferOutput = true;
>
>>
>
>>            Response.ContentType = "Application/pdf";
>
>>
>
>>            Response.Clear();
>
>>
>
>>            Response.WriteFile("C:\\DEL\\JTEST3.pdf");
>
>>
>
>>            Response.End();
>
>>
>
>>    }
>
>>
>
>>
>
>> -- --Original Message-- --
>
>> From: itext-questions-bounces@(protected)
>
>> [mailto:itext-questions-bounces@(protected)] On Behalf Of Paulo
>
>> Soares
>
>> Sent: Monday, October 01, 2007 10:41 AM
>
>> To: Post all your questions about iText here
>
>> Subject: Re: [iText-questions] Japanese checkboxes
>
>>
>
>> Post the PDF and your code, we don't have a crystal ball, you know?
>
>>
>
>> Paulo
>
>>
>
>>> -- --Original Message-- --
>
>>> From: itext-questions-bounces@(protected)
>
>>> [mailto:itext-questions-bounces@(protected)] On Behalf Of
>
>>> Jeff Metzner
>
>>> Sent: Monday, October 01, 2007 2:29 PM
>
>>> To: itext-questions@(protected)
>
>>> Subject: [iText-questions] Japanese checkboxes
>
>>>
>
>>> I have a PDF form with checkboxes when the value for the checkbox is
>
>>> in Japanese.
>
>>>
>
>>> When I am trying to display the PDF using pdfFormFields.SetField, the
>
>>> checkbox does not get checked even though the correct value is set for
>
>>> the field.
>
>>>
>
>>> Any help on this would be appreciated. (We are using iTextSharp, but I
>
>>> don't think the problem is .NET-specific.)
>
>>>
>
>>> Thanks,
>
>>>
>
>>> Jeff Metzner


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

©2008 junlu.com - Jax Systems, LLC, U.S.A.