you are right - there is room for improvement on the documentation side. 
Tutorials and more samples would be a good addition. 

Under http://svn.apache.org/repos/asf/pdfbox/site/ you will find the files 
which make up the documentation about PDFBox. That should give you the ability 
to add the tutorials you are talking about.

To fill an XFA form unfortunately there is more to it than simply using 
setXFA(PDXFA xfa). The currently missing part is that PDXFA exists but doesn't 
contain a lot of functionality - up to revision 1435039 it was a simple 
placeholder. The PDXFA object needs to be enhanced to support forms filling. 
Extracting XFA has been done and is available in trunk. Correctly modifying the 
XFA trough PDXFA still needs to be done. As soon as this is completed 
setXFA(PDXFA xfa) will have its use.

Providing that capability will partially give you what Adobe LiveCycle Forms 
offers. You will have the ability to add form data to a form and extract form 
data. What it won't give you is creating/changing a valid PDF form from XFA 
because there is more to it than simply replacing the template part of the XFA 
content. This is another bit Adobe LiveCycle Forms is providing. In fact if one 
is using Adobe LiveCycle Forms only to add data to a preexisting form there are 
other (and cheaper) Adobe LiveCycle modules and capabilities to achieve that.

Hope that clarifies that providing the capability to fill a XFA form using 
PDFBox is an important step, which is why we are working on that. It won't be a 
full replacement for LiveCycle Forms though.


Maruan Sahyoun

Am 18.01.2013 um 08:43 schrieb Duane Nickull <[email protected]>:

> We do this professionally.  You are right though.  The community docs on
> this matter are not very well documented. We tried to upload docs about
> this and other issues but could not.  Over 50% of the code samples are
> hard to find for PDFBox.  He core engines rock but need to get evangelists
> involved too ;-)  I would love to help if someone gave me access to create
> tutorials. I used to do this for Adobe as a Sr Technical evangelist and
> really believe that PDFBox could benefit from the same level of love.
> Having said that, it is highly possible that my own lack of understanding
> is the problem to upload tutorials (Apache admins - please clarify). Most
> of my problems are caused by a defective malfunction between the chair and
> the keyboard ;-)
> 
> I will offer this advice for free.  You have to create an XFA data
> instance and then use the API in the prescribed manner. If the form is in
> fact an XFA form, you have to use the prescribed interface
> 
> public void setXFA(PDXFA xfa)
> 
> In this case the method returns nothing although it does throw a
> 
> The important thing is that you have legitimate XFA to use as a param. If
> the XFA instance data matches the schema derived PDF form, it should work.
> In fact, this is a potentially free replacement for LiveCycle Forms.  Oh
> yes I will get in deep sh!t for saying that but the reality is that
> everyone is walking the stack upwards.  Innovate at the top end as the
> lower end is commoditized.
> 
> I have to earn a living though so if you are truly stuck I can help for a
> modest fee.  OTOH, I will freely point you at all online resources to help
> you.  It comes down to time vs money.  Everything you need to solve this
> issue is in front of you but it will take a lot of time to understand.
> PDF is not a simple spec.
> 
> Duane
> 
> 
> ***********************************
> Technoracle Advanced Systems Inc.
> Consulting and Contracting; Proven Results!
> i.  Neo4J, PDF, Java, LiveCycle ES, Flex, AIR, CQ5 & Mobile
> b. http://technoracle.blogspot.com
> t.  @duanechaos
> "Don't fear the Graph!  Embrace Neo4J"
> 
> 
> 
> 
> 
> 
> On 2013-01-17 9:49 PM, "kenton wu" <[email protected]> wrote:
> 
>> Hi All,
>> 
>> Is there any one who knows how to fill data into pdf xfa forms by PdfBox?
>> I only find two functions, AcroForm.getXFA() and AcroForm.setXFA(), but I
>> don't know how to do it, I wish there is an example or description about
>> it.
>> 
>> Thank you!
>> 
>> Best Regards,
>> 
>> Kenton
>> --------------------------------------------------------------------------
>> ------------------------------------------------------------------
>> Kenton Wu - KISTERS Shanghai Software Development Co., Ltd. - No. 450
>> Fushan Rd. 9A - 200122 Shanghai - China
>> Phone: +86 21 68670119 -806 | E-Mail: [email protected] | WWW:
>> --------------------------------------------------------------------------
>> ------------------------------------------------------------------
>> This e-mail may contain confidential and/or privileged information. If
>> you are not the intended recipient (or have received this e-mail in
>> error) please notify the sender immediately and destroy this e-mail. Any
>> unauthorised copying, disclosure or distribution of the material in this
>> e-mail is strictly forbidden.

Reply via email to