Expand my Community achievements bar.

Merge XFA data model with PDF using .NET or Java

Avatar

Former Community Member
Hi,

Ii there any way to merge a PDF form(creating using Livecycle designer 7.0) with corresponding XFA form data programatically using Java or .NET or both and then eventually create a new pdf with the "filled" data?



So far I found this: http://www.aspose.com/Products/Aspose.Pdf.Form/Intro/Overview.html



Appreciate a reponse

thx,

CR
2 Replies

Avatar

Level 2
Hi CR

Yes, you can do this. Create an instance of Acrobat, then use the Open command, as follow:



global::Acrobat.AcroAVDoc avDoc = new global::Acrobat.AcroAVDoc();

avDoc.Open(@"path.to.xfdf.file","comment")



the xfdf file must have a reference to the PDF file.

now you can safe the "new" pdf file as follow:



global::Acrobat.AcroPDDoc pdDoc = (global::Acrobat.AcroPDDoc)avDoc.GetPdDoc();

pdDoc.Save((short)glboal::Acrobat.PDSaveFlags.PDSaveFull, @"path.to.new.pdf);

pdDoc.Close();

avDoc.Close();



This is pseudo code, I hope it helps



Cheers Harry

Avatar

Former Community Member
Hi,



did you make it work? I'm trying to do the same kind of things in Java or C++.



I'm trying to "silently" print an XFA file from my application. (the path to the corresponding PDF is inside the XFA). So far the Adobe c++ PDF Library doesn't seem to be able to do that, so maybe there is a solution in Java...



Could you please post more specific code, if you made some progress?



Thank you very much,

Stephane