Pdf form filles

hi

Is there a way to load form-fill pdf and save it as regular pdf but not as form fill pdf? (other words like printing to pdf file )

this way I can save quite a bit in my output filesize


thanks
Anand

Hi Anand,

You can use FlattenAllFields method for that purpose. This way, you’ll be able to save your input PDF form in a simple PDF file. You can use the following code snippet:


//create a form object

Aspose.Pdf.Kit.Form form = new Aspose.Pdf.Kit.Form();

//set input and output files

form.SrcFileName = “Input.pdf”;

form.DestFileName = “output.pdf”;

//call FlattenAllFields method

form.FlattenAllFields();

//save the output file

form.Save();


I hope this helps. If you find any issues or have some more questions, please do let us know.
Regards,


Thanks that worked