Print PDF Form Fields only

I am trying to fill a pdf form and then print only the form fields. I've tried coming at this from a couple angles to try and find something that works, but I have been hitting dead ends. I don't have any problem with the filling and printing part, that works fine. I am having trouble with just printing the form fields. This is an automated process so really I just need a pdf that only has the form fields 'enabled' or 'visible'. No one is going to be using the resulting pdfs, so we can use just about any technique that will accomplish the goal.

What I thought would work is that the aspose.pdf.Pdf object has a DOM that looked like I could easily go loop through all the paragraphs in all the sections in it and set the IsEnabled property to false to all objects that are not form fields. This looked promising, but I can't figure out how to load my existing pdf file into the pdf object. It looked as though the only way to do this is with the BindXml. Is there another way to load a pdf into the pdf object or is there some other way to take a pdf file and convert it into the aspose xml format and then load it into the pdf object.

If you thing there is a better way to accomplish what I am trying to do, please let me know.

Thanks!

Hi,

Thank you for considering Aspose.

Aspose.Pdf is used to create Pdf from scratch. We have another product which deals with existing Pdf i.e Aspose.Pdf.Kit. Please download it and check our documentation section.

http://www.aspose.com/Wiki/Default.aspx/Aspose.Pdf.Kit/

If you need more help please do let us know.

Thanks.

Thank you for getting back with me. I have already looked at all the pdf.kit documentation and I am using the pdf kit for autofilling the form. However, I could not figure out how to make everything except the form fields invisible in a pdf with any of the kit classes. Thats why I looked at the Pdf class since it had a DOM of all the objects. Is there anything in the kit that will do what I need it to do?

Hi,

I don't think you can make anything invisible, only links and line can be set invisible. You can Flatten the fields so that no one can change its values. I am not sure that I have understood your problem clearly, but what are the things that you need to set invisible.

Thanks.

I have a pdf with form fields on it. I want to print only the form fields. I was thinking that maybe I could set everything else in the pdf 'invisible' 'hidden' or something like that, and then just print the pdf.

If that is not possible, then maybe I could create a brand new pdf based on the existing one. The brand new pdf would only need to have the form fields from the existing pdf. Is there a way that I could 'copy' or 'clone' the form fields and then put them in a new pdf? Then I could just print the new pdf.

Hi,

I am afraid that even that is not possible to clone the fields from an existing Pdf.

Thanks.

I have discussed with the developers about “clone field”. Currently Aspose.Pdf.Kit can extract most of the information of field. The FormEditor.LocalCopyField() can extract field info and create new field.
You need to copy (clone) the fields into a new PDF. Aspose.Pdf.Kit can only process existing PDF. So you need to extract fields info and create the new PDF using Aspose.Pdf. Aspose.Pdf supports some simple fields (refer to Manipulating Form Fields).
If you want to implement the cloning function by yourself you can evaluate Aspose.Pdf.Kit and Aspose.Pdf to see if they match your requirement.