I want to craete a PDF with XFA data but I don't want the XFA data to be visible when the PDF is viewed, however, I want it to be reachable via following code:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PdfReader reader = new PdfReader(src);
PdfStamper stamper = new PdfStamper(reader, baos);
AcroFields form = stamper.getAcroFields();
XfaForm xfa = form.getXfa();
How can I do this?
Thanks
Apparently what I asked is possible according to XML Forms Architecture (XFA) Specification Version 3.3. It can be done using XFAF. Under 'The Relationship between XFA and PDF' section in page 20 it says: