> I would like to programmatically generate an XFA form with 
> ImageField components. That is, form elements where images 
> can be rendered. I can do this manually using Adobe Designer, 
> but I want the form-generation to be driven by code.
 
> Is this possible using iText ? If so, how ?
 
In theory, yes... but you'll have to do the vast majority of the heavy lifting 
yourself.
 
iText, as is, has high level APIs to get and set XFA field values.  And that's 
it.
 
You'd have to generate the XML yourself and add it to the appropriate place in 
the PDF.  You could use the PdfFormField class to help you build the fields, 
but there's still quite a bit of work to be done.
 
And if you want a /dynamic/ form, you're in for a whole new set of headaches.
 
So you need to modify iText to allow you to write XFA, and then use the 
relatively low-level PDF objects to do the rest.
 
Oh, and there's no such thing as a "NeedAppearances" flag in XFA forms, so you 
need to draw all your appearances in the appropriate places (values go in the 
annotation appearance dictionary, everything else goes into the page contents).
 
And on and on.  Structure, marked content, lions, tigers, and bears.  Oh My.
 
Yes, I have looked into implementing this... why do you ask? ;)

--Mark Storer 
  Senior Software Engineer 
  Cardiff.com

#include <disclaimer> 
typedef std::Disclaimer<Cardiff> DisCard; 

 
-------------------------------------------------------------------------
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
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to