I am creating an brand new PDF file from scratch.  I have added a table
with various images and text in  it.  The main component one the PDF is
the .swf (my flex application).  In order to set data for this application
do display - we do this:

PdfReader reader = new PdfReader(chartTemplateFile.getAbsolutePath());
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
PdfStamper stamper = new PdfStamper(reader, outputStream);
AcroFields form = stamper.getAcroFields();form.setField("Data",
pdfXmlDocument);
stamper.close();                reader.close();


Now in order to have this Data field in the PDF - I need to be able to add
a field to the PDF that I am creating from scratch and here is what I did:
PdfFormField field = new PdfFormField(writer,
0.0f,0.0f,104.08f,31.4f,PdfAction.createHide("data", true));
        field.setName("Data");
        writer.getAcroForm().addFormField(field);


The above code did not achieve the purpose and hence I am pinging you.

Formerly - we had a PDF template (which had the XFA that I reported
earlier) and the above AcroForm code worked fine.  Now that I create a PDF
from scratch - I am missing the hidden field and hence the data and the
swf shows blank.

The process followed earlier - is listed at this URL.  I am trying to
achieve the same (swf embedding in PDF) programmatically using iText.

http://www.adobe.com/devnet/flex/articles/portable_ria.html


Thanks in advance for your help.
 

Sanjeev Sharma
http://www.infovista.com





On 8/11/11 1:05 AM, "1T3XT BVBA" <[email protected]> wrote:

>he setVisibility() method is explained on p246.
>You need TextField.HIDDEN as parameter.


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to