Hello.  I am seeing some strange behavior in a PDF I'm generating with iText
2.1.4 and I'm not sure if the problem is my code, my data, iText, or the
Adobe plug-in.

My scenario is that I'm pulling data stored as a CHAR data type in an OS/400
DB2 database and using the PDFStamper to insert that data into fields of an
AcroForm.  The CHAR data type is encoded with EBCDIC.  This is being done by
a servlet in a web application (WebSphere 6.1, Java 1.5).  The problem I'm
having is with the way apostrophes are appearing in the PDF once it has been
generated and is viewable in the web browser.  For example, I have the text
"Moe's Tavern" stored in the database, but this turns into "Moe(c)s Tavern" in
the generated PDF (the apostrophe has turned into a copyright symbol).  The
strange thing is that the copyright symbol only appears if the field does
not have the focus.  As soon as I give the field focus, by clicking in it or
tabbing to it, the apostrophe is displayed correctly.

The way the data is being stored is that I the form is submitted to the
servlet with a submit button on the PDF.  The servlet is using the FDFReader
to get the field values and store them in the database with a simple SQL
insert or UPDATE statement (no relational data framework or anything like
that in between).

I worked with my database admin to make sure that the apostrophe was
actually being stored in the table correctly, as opposed to just being
displayed correctly by the software I was using to query the database.  As
far as we can tell the character code is correct for the apostrophe.

Does anyone have any ideas on what might be causing this problem?

-- 
Nick Watts
blog: thewonggei.wordpress.com
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to