IF FIELD doesn't work in exported PDF

Hi,
I need to put an image and some text in the footer. It should be different on each page so I decided to use IF FIELD to steer the visibility.
Everything works fine when I save document in DOC format, but it doesn’t work while saving to PDF.

Here is sample code to reproduce this case (sample document ‘test.doc’ in attachment):

Document document = new Document("c:\test.doc");
DocumentBuilder db = new DocumentBuilder(document);
db.moveToBookmark("bookmark");
FieldStart start = db.insertField("IF "", null);
db.moveTo(start.getNextSibling().getNextSibling());
db.insertField("PAGE", null);
db.write("" = "1" "sample text on page 1" "sample text on page 2"");

document.save("C:\test_output.doc");
document.saveToPdf("c:\test_output.pdf");

Hi

Thanks for your request. This occurs because Aspose.Words for Java does not support IF field evaluation. This feature is only supported in .NET version of Aspose.Words at the moment.
I linked your request the appropriate issue. You will be notified as soon as this feature is available in Java.
Best regards.

We are happy to inform you that the first auto-ported version of Aspose.Words for Java is ready. This version supports updating fields. You can get it from here.

Best regards,
Aspose.Words team

(8)