File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes How  to avoid garbage values written into a pdf file using itext? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "How  to avoid garbage values written into a pdf file using itext?" Watch "How  to avoid garbage values written into a pdf file using itext?" New topic
Author

How to avoid garbage values written into a pdf file using itext?

Pratik Shirsat
Greenhorn

Joined: Jul 21, 2010
Posts: 8
HI,
I m writing into a pdf file from my application using a itext api.A remark field from the application is first populated by the client which is stored in the database after saving and afterwards fetched from database and written into a pdf file.What client does is...he copies the data from a word file and copies it in the remark filed in the application before saving it.This data in MS Word contains bullets and numbers.So When this data is stored in the database ,it stores some garbage values into the database which I suppose represent the bullets.After generating the PDF the same garbage values appear in PDF.

the data written into PDF looks somewhat like this:
"Following are the actions taken by MCG
Bangalore:
Branch has marked debit freeze
in the Effone Technologies account no.

"


So..is there any way by which these garbage values can be avoided???
Please help me out as this is really urgent....

Thanks
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Best to scrub the MS Word garbage at its source before it gets into the database.

Either client-side with a script like the one described here:
http://jhy.io/tools/convert-word-to-plain-text

or on the server-side before saving it to DB.

 
jQuery in Action, 2nd edition
 
subject: How to avoid garbage values written into a pdf file using itext?
 
Similar Threads
Application Design thoughts..
how to export PDF report within the Arabic and English data through jsp code.
reading pdf's table problem
Showing pdf files in jsp giving error
Can IText Acheive this ?