"Muhammad Asif" <[EMAIL PROTECTED]> writes: > Hello, > > 1- I want to use iText for parsing the filled pdf forms; extract and > save the form fields values as FDF in database. PDF Forms are not > submitted to server but reside in a folder on file system. Since there > will be hundreds of forms the IO operation with OutputSteam to a file > will be expensive. Please correct if I'm wrong? Is it possible to > extract filled pdf forms in FDF format in a string and save in > Database directly instead of writing a file on file system? >
Have a look at the FDFReader and FDFWriter
classes. FDFReader.getFields() returns a HashMap containing the filled
in fields. From there you can extract the values and write them to the
database.
FDFWriter has various methods that let you set the fields values.
> 2- Later I will need to get the FDF string from database and set the
> values in existing empty pdf files to display for user. Again I would
> like to get FDF contents as string and writing into PDF file without
> involving any IO operations.
>
You aren't going anywhere without I/O but you can avoid using the file
system. Just use ByteArrayOutputStream.
Perhaps you can cache your forms using a form factory. But this will
depend on the memory consumption caching hundreds of documents.
> Is it possible using iText any Example or tutorial?
>
The iText book has examples using above mentioned classes.
regards
Dirk
>
> Thanks for your time.
>
> Asif
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
>
--
_____________________________________________________________________
RISC: Relegate Important Stuff to Compiler
pgpCVmORnw3yX.pgp
Description: PGP signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
