We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

FieldType

Hi,


I used to have Aspose.Words 14.3.0 and after running the code below I would get FieldType.FIELD_PAGE (33) for some fields. Now, when I am using Aspose.Words 15.11.0 I would get FieldType.NONE (0) for the same fields in the attached document. My question is, am I going to get FieldType.NONE for all the fields that used to be FieldType.FIELD_PAGE? Are there any other changes in field types like this one?

Thanks,
Zeljko

Code:

public void getAsposeFields() throws Exception {
Document doc = new Document(“Test.docx”);
@SuppressWarnings(“rawtypes”)
NodeCollection fieldStarts = doc.getChildNodes(NodeType.FIELD_START, true);
for (int i = 0; i < fieldStarts.getCount(); i++) {
FieldStart start = (FieldStart) fieldStarts.get(i);
System.out.println("FieldType: " + start.getFieldType());
System.out.println(start.getField().getFieldCode());
}
Hi Zeljko,

Thanks for your inquiry. You are getting FieldType.NONE (0) for page field because the field's code of page field is {\PAGE} in your document which is incorrect. Please replace it with { Page } to get the correct field type and let us know if you have any more queries.

Hi Zeljko,


Thanks for your inquiry. We have also logged this problem in our issue tracking system as WORDSNET-13059. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

Hi Zeljko,


Regarding WORDSNET-13059, it is to update you that the fix of this issue is included in Aspose.Words for Java 16.1.0 release; so, please upgrade to the latest version from the following link:

Aspose.Words for Java 16.1.0

Hope, this helps.

Best regards,

The issues you have found earlier (filed as WORDSNET-13059) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.