Using of format switches

We are in the process of evaluating Aspose.Word for Java.

First of all, I want to say - your product is excellent!

I have the following question:
It seems that using of format switches is supported partially
in Java. Is this right?

Example 1:
{ DOCVARIABLE FIRMA * CHARFORMAT }
Note: First character is bold

Result after updating docvariable-field:

CURSOR Software AG

I would have expected:
CURSOR Software AG

Example 2:

{CREATEDATE @ “dd.MMMM.yyyy HH:mm”}

Result after updating createdate-field:
03.März.2010 00:00

I would have expected:
03.März.2010 18:55

Can you tell me when this feature will be probably available for Java ?
Thanks a lot.

Sincerely,
Matthias Schlosser

Hi

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.

I have found anther example.

Example 3:

{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)

Thanks
a lot.

Sincerely,
Matthias Schlosser

Hi

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.

Hi,

see attached document and code.

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

Thanks
Matthias

Hi Matthias,

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,

Hi Andrey,

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.

Thanks
Matthias

Hi Matthias,

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

Hi Matthias,

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,

Hi Alexey,

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.

Sincerely,
Matthias Schlosser

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,

Hi,

at the moment we are testing the new beta release of Aspose
Words for Java 10.0

Example1 (see above) is working fine now!

Following format switches are not working as expected:
Example 3:
{ REF ANGEBOTSDATUM @ "dd.MMMM.yyyy"}

Result after updating REF-field ANGEBOTSDATUM:
24.03.11 16:27:00

I would have expected:
24.März 2011

Example 4:
{ DOCVARIABLE ANGEBOTSDATUM @ "dd.MMMM.yyyy"}

Result after updating DOCVARIABLE ANGEBOTSDATUM:

24.März.0011

I would have expected :

24.März 2011

Example 5:

{ REF myVALUE # "0,0"}

Result after updating REF myValue:
12345,13

I would have expected:
12345,1

Note: { DOCVARIABLE myVALUE # "0,0"} works fine!

Thanks a lot.

Best regards
Matthias

Hello

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,

The issues you have found earlier (filed as 16000) have been fixed in this update.

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

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

(20)

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

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

Hi Matthias,

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.

Best regards,

The issues you have found earlier (filed as WORDSNET-4632) have been fixed in this Aspose.Words for .NET 16.10.0 update and this Aspose.Words for Java 16.10.0 update.

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