Image field stay display whereas the field is merged

I try to merge a field of type ‘picture’ right that: image:mergefield fieldname.
In 10.2.0 version of aspose word, it’s correctly working but in aspose word 10.8.0, the mergefield is still display whereas the field is merged.
Is it a bug, or my way to use is not the good way?

Hi there,

Thanks for your inquiry.

Can you please attach your template and code here for testing as well? We will try reproducing the issue on our side.

Thanks,

Hello,

Thx for your react.

Into generated file is displayed IMAGE:SIGNATURE and the picture.
I attached the word file, the result in the capture attached (after pdf conversion but the problem is the same without that) and the source code which use it.

Pierre

Hi Rousselot,
Thanks for your Inquiry. Using latest Aspose.Words 10.8, i managed to reproduce the problem on my side. The Issue is already known. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.

Ok thx a lot!

We have another problem too.
When we merge a
file of type word with the extension “.doc”.
It’s happened in 10.8.0
of aspose Word and not in 10.2.0 version.
I attached template which
cause a problem and the error message in the back.

Message
error:

java.lang.ClassCastException: com.aspose.words.xk cannot be cast to com.aspose.words.tt
	at com.aspose.words.kz.Km(ExpressionParser.java:92)
	at com.aspose.words.kz.b(ExpressionParser.java:35)
	at com.aspose.words.ky.a(ExpressionEvaluator.java:40)
	at com.aspose.words.ky.a(ExpressionEvaluator.java:30)
	at com.aspose.words.cr.b(ComparisonEvaluator.java: 46)
	at com.aspose.words.cr.a(ComparisonEvaluator.java: 22)
	at com.aspose.words.nh.KE(FieldIf.java: 23)
	at com.aspose.words.Field.b(Field.java: 332)
	at com.aspose.words.Field.a(Field.java: 248)
	at com.aspose.words.pf.a(FieldUpdater.java: 150)
	at com.aspose.words.pf.j(FieldUpdater.java: 107)
	at com.aspose.words.pc.execute(FieldUpdateExecutionItem.java: 82)
	at com.aspose.words.pf.ix(FieldUpdater.java: 97)
	at com.aspose.words.pf.a(FieldUpdater.java: 73)
	at com.aspose.words.zg.a(MailMergeRegion.java: 299)
	at com.aspose.words.zg.ZD(MailMergeRegion.java: 275)
	at com.aspose.words.zg.a(MailMergeRegion.java: 70)
	at com.aspose.words.MailMerge.execute(MailMerge.java: 254)
	at com.aspose.words.MailMerge.execute(MailMerge.java: 279)
	at com.es.ws.gedMergews.service.impl.GedMergewsManagerImpl.mergeDocument(GedMergewsManagerImpl.java:181)
	at com.es.ws.gedMergews.rs.impl.GedMergewsServiceImpl.merge(GedMergewsServiceImpl.java:81)

You already have sources about the java method named “mergeDocument”

The line 181 seems to cause this problem: “merge.execute(names, values);”

If you can look furtively.
Thx you.

Hi
Thanks for your request and sorry for delayed response. Unfortunately, I cannot reproduce the problem on my side. I used the following code for testing:

Document doc = new Document("C:\\Temp\\CCTP.doc");
String[] names = new String[] { "NO_AFFAIRE", "LIBELLE_AFFAIRE", "CHANTIER_1_COM", "CHANTIER_2_COM", "CHANTIER_3_COM", "CHANTIER_4_COM", "CHANTIER_5_COM", "PLANS", "DIV10", "DIV11", "DIV12", "DIV13", "DIV1", "DIV2", "CA_IR_PRENOM", "CA_IR_NOM", "COORD_SPS_IR_PRENOM", "COORD_SPS_IR_NOM", "COORD_TRAV_IR_PRENOM", "COORD_TRAV_IR_CONTROLEUR", "DIV3", "DIV14", "DIV4", "DIV15", "DIV16", "DIV5", "DIV17", "DIV6", "DIV7", "DIV9"};
doc.getMailMerge().execute(names, names);
doc.save("C:\\Temp\\out.doc");

It would be great if you provide a simple code example that will allow us to reproduce the problem on our side. We will check the issue and provide you more information.
Best regards,

We also have this problem since I upgraded from 10.2 to 10.8. We can’t possibly put out a new release of our product with a bug this bad. Please fix this ASAP

Hi there,

Thanks for your inquiry.

We apologise for the inconvenience. This bug has been confirmed as regression and is fixed in the current code base. The fix will be available in the next version of Aspose.Words due out in a week or so. We will inform you as soon as it’s available.

Thanks,

Hi,
Users brought me back this anomaly but i can’t reproduice it too.
I think it could be a field value to merge which causes this error.
When i know more about it…

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

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

Thank you.
We deploy it on test platform…

See you soon

Well done!
It’s working…no bug found today.
Have a nice day

Hi there,

Thanks for your confirmation.

It’s great everything is working as expected. Please feel free to come back any time if you have any queries.

Thanks,

Hi
I’ve something new about it. I can reproduice this bug everytime and aspose word v11 is now deployed in PRODUCTION plateform.
number of mergefields:22

namefields send to merge:[DATE_COURANTE, NO_AFFAIRE, CA_IR_PRENOM, CA_IR_NOM, CA_IR_ENTITE, CA_IR_SOUS_ENTITE, CA_IR_TEL, CA_IR_FAX, CA_IR_EMAIL, LIBELLE_AFFAIRE, CHANTIER_1_COM, CHANTIER_2_COM, CHANTIER_3_COM, CHANTIER_4_COM, CHANTIER_5_COM, DIV1, DIV2, DIV1, CA_IR_PRENOM, CA_IR_NOM, IMAGE:SIGNATURE, PLANS]
valueFields send to merge:[07/03/2012, 2011108624, , , , , , , , Affaire réclamation de test, STRASBOURG, MUNDOLSHEIM, , , , AU, 121, AU, , , , 11]
Aspose v11 error send to us:java.lang.ClassCastException: com.aspose.words.xs cannot be cast to com.aspose.words.tx
java.lang.ClassCastException: com.aspose.words.xs cannot be cast to com.aspose.words.tx
at com.aspose.words.ld.KK(ExpressionParser.java:92)
at com.aspose.words.ld.b(ExpressionParser.java:35)
at com.aspose.words.lc.a(ExpressionEvaluator.java:40)
at com.aspose.words.lc.a(ExpressionEvaluator.java:30)
at com.aspose.words.ct.b(ComparisonEvaluator.java: 47)
at com.aspose.words.ct.a(ComparisonEvaluator.java: 22)
at com.aspose.words.nl.Lc(FieldIf.java: 23)
at com.aspose.words.Field.b(Field.java: 332)
at com.aspose.words.Field.a(Field.java: 248)
at com.aspose.words.pj.a(FieldUpdater.java: 150)
at com.aspose.words.pj.j(FieldUpdater.java: 107)
at com.aspose.words.pg.execute(FieldUpdateExecutionItem.java: 82)
at com.aspose.words.pj.iC(FieldUpdater.java: 97)
at com.aspose.words.pj.a(FieldUpdater.java: 73)
at com.aspose.words.zp.a(MailMergeRegion.java: 299)
at com.aspose.words.zp.aay(MailMergeRegion.java: 275)
at com.aspose.words.zp.a(MailMergeRegion.java: 70)
at com.aspose.words.MailMerge.execute(MailMerge.java: 254)
at com.aspose.words.MailMerge.execute(MailMerge.java: 279)

Thank you,

I found where the problem comes from.
In the document, the conditionnal mergefield on field name DIV1 seems to have un character like this “(” or “)” which causes this error when Aspose v11 execute the merge operation.
If we replace “Autres (à préciser ci-dessous)” by “Autres à préciser ci-dessous”, it’s working!
I think we can work around the problem on our side.
Unfortunetly, this problem is coming even if we send a value which contains this special character and we can’t change the value sent by users. There wasn’t this bug before (in version 10.2 Aspose word).
Thank you to resolve it as soon as possible.
Pierre

Hi,

Thanks for the additional information and sorry for the delayed response.

While using the latest version of Aspose.Words i.e. 11.1.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system as WORDSNET-5995. Your request has also been linked to this issue and you will be notified as soon as it is resolved.

Sorry for the inconvenience.

Best Regards,

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

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