Hi,
I want to remove all field codes in word and convert it to pdf file in java
could you please help me.
Thank you.
Hi,
I want to remove all field codes in word and convert it to pdf file in java
could you please help me.
Thank you.
You can remove all fields from Word document and then convert it to PDF format by using following Java code of Aspose.Words API:
Document doc = new Document(new FileInputStream("C:\\temp\\input.docx"));
System.out.println("Total Fields = " + doc.getRange().getFields().getCount());
for (Field field : doc.getRange().getFields())
field.remove();
System.out.println("Total Fields = " + doc.getRange().getFields().getCount());
doc.save("c:\\temp\\21.4.pdf");