Thanks for your request. The problem occurs because Aspose.Words for Java does not fully support field evaluating. But .NET version of Aspose.Words already supports this feature.
We are currently working on synchronizing .NET and Java versions of Aspose.Words. Once We finish this work, all features, which are available in .NET version will be also available in Java version. We plan to finish this work somewhere in May. You will be notified.
Best regards.
{SET Number "12.345,00"} {REF Number # "#.##0,00"}
Calling updateFields() results in an exception
Stacktrace:
java.lang.IllegalArgumentException: Malformed pattern "#.##0,00"
at java.text.DecimalFormat.applyPattern(DecimalFormat.java:2592)
at java.text.DecimalFormat.applyPattern(DecimalFormat.java:2286)
at asposewobfuscated.hp.cI(JavaHelper.java:26)
at com.aspose.words.agi.TO(FieldFormat.java:92)
at com.aspose.words.agi.pe(FieldFormat.java:54)
at com.aspose.words.Field.pe(Field.java:382)
at com.aspose.words.Field.update(Field.java:147)
at com.aspose.words.Range.updateFields(Range.java:159)
at com.aspose.words.Document.updateFields(Document.java:1135)
Thank you for additional information. I cannot reproduce this problem on my side. Actually, the problem cannot occur with REF field at all because Aspose.Words supports updating only DOCPROPERTY and DOCVARIABLE fields. So please attach the document, which will allow me to reproduce the problem.
Best regards.
try
{
doc = new Document(LOAD_FILENAME);
builder = new DocumentBuilder(doc);
doc.updateFields(); // Exception will be thrown here
doc.save(SAVE_FILENAME);
}
catch (Exception e)
{
e.printStackTrace();
throw new RuntimeException(e);
}
Notes
Language and region: Germany
Aspose.Word for Java: 4.0.2 BETA
Thank you for additional information. I cannot reproduce the problem on my side using your document and code. Please make sure that you use 4.0.2 version inside your application. To check version of Aspose.Words for java, unzip Aspose.Words.jar, open META-INF\ MANIFEST.MF file in notepad, you will see the following:
Manifest-Version: 1.0
Specification-Title: Aspose.Words for Java
Implementation-Title: Aspose.Words for Java
Specification-Version: 4.0.2.0
Implementation-Version: 4.0.2.0
Specification-Vendor: Aspose Pty Ltd
Implementation-Vendor: Aspose Pty Ltd
Copyright: Copyright 2003-2010 Aspose Pty Ltd
Best regards,
i have checked version of Aspose.Words.jar. It is 4.0.2.0.
Note:
If we use format switch # “#,##0.00” (java formatter notation) inside word document, code will not fail anymore.
But result in word is not as desired. --> “12.345, 000”
It seems that non java formatter notation results in an exception.
Thank you for additional information. I managed to reproduce the problem when set German culture on my side. I created a separate issue for this problem, but I think it will be automatically fixed once we port field Evaluation engine from .NET to Java.
Best regards.
Hi Alexey,
you planned to finish work on synchronizing .NET and
Java versions of Aspose.Words somewhere in May. Can you tell
me if this feature will be available soon?
Thanks
a lot.
Sincerely,
Matthias Schlosser
Unfortunately the release date of Aspose.Words for Java has been moved to June 2010. You will be notified once it is released. Sorry for the inconvenience.
Best regards,
you had planned to finish work on synchronizing .NET and Java versions of Aspose.Words somewhere in June. Can you tell me something about the new release date of Aspose.Words for Java? We have to plan our releases, therefore i am asking again.
Thanks
a lot.
Hello
Thanks for your inquiry. Unfortunately, due to the complexity of porting from .NET to Java process the release data was postponed. Most likely it will come out somewhere in the end of August.
Also please have a look at this: https://docs.aspose.com/words/net/convert-a-document-to-pdf/
Best regards,
Thank you for reporting these problems to us and for the additional information. I managed to reproduce the problems on my side. Your request has been linked to the appropriate issues. You will be notified as soon as these issues are resolved.
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.
Thanks for your request. Yes, you are right. There is another issue (unresolved yet) in our defect database regarding switches in REF fields. This thread is linked to this issue too. We will let you know once it is resolved.