Converting fillable word document to fillable pdf file using java

85 Views Asked by At

I want to convert my fillable word document into fillable pdf document? Is there any solution?

I used aspose.words to insert some fill in forms into document and then converted it into PDF, but from fill-in forms were just empty fields with border...

1

There are 1 best solutions below

0
On BEST ANSWER

You should use PdfSaveOptions.PreserveFormFields options to preserve form fields in PDF:

Document doc = new Document("C:\\Temp\\in.docx");
PdfSaveOptions opt = new PdfSaveOptions();
opt.setPreserveFormFields(true);
doc.save("C:\\Temp\\out.pdf", opt);