Aspose.Word for Java Mail merge document Distortion problem

Hello,
We purchased Aspose.Word for Java. We have a problem using your product when creating merged 2003 and 2007 Word documents. We are alos experiencing problems when creating documents with Hebrew content.
Please find attached the following files:

  1. english_ & _hebrew_correct_merged.docx
    This file was created with Microsoft’s Merge program. It shows how we would like the file to appear.

  2. bad_hebrew_Merged.docx
    This file was created using Aspose to create a Word 2007 document with Hebrew content. You can see that most of the content is not there, and what is there is completely unformatted.

  3. bad_hebrew_Merged.doc
    This file was created using Aspose to create a Word 2003 document with Hebrew content. Here at least all the content appears, but the lines are close together and not formatted as seen in file 1.

  4. bad_english_Merged.docx
    This file was created using Aspose to create a Word 2007 document with English content. Unlike its hebrew equivalent, at least for the most part, most of the content appears. However it is badly unformatted.

  5. bad_english_Merged.doc
    This file was created using Aspose to create a Word 2003 document with English content. This is similar to file 2 in that all the content appears, but the lines are close together and not formatted as seen in file 1.

  6. prototype_File.docx
    This contains the Word template for merging.

  7. value_table_for_prototype.xlsx
    This contains the values to be merged into the template.

  8. AsposeBug.java.txt
    This is the Java program that performs the merging using Aspose for Word

Look forward to hearing from you
Shmoel Mizrachi

Hello

Thanks for your request. I cannot reproduce the problem on my side using the latest version of Aspose.Words for Java (4.0.2). You can download this version from here:
https://releases.aspose.com/words/java
Please try using the latest version of Aspose.Words for Java, and let me know how it goes on your side.
Best regards,

Hellow Mr. Noskov
Thank you for your quick reply.
I have used the latest version Aspose.Words for Java 4.0.2 BETA as your suggestion but the results still have the same distortion problem as you see at the attached files.
I am still waiting for solution.
Best regurds

Eng. Mizrachi Shmoel
Payroll4Web Generator & Files Interface projects manager
Malam PayRoll Company

Hello

Thank you for additional information. I have tried one more time, and I still cannot reproduce the problem. I use the following code for testing:

Document prototypeFile4English = new Document("C:\\Temp\\prototype_File.docx");
Document prototypeFile4hebrew = new Document("C:\\Temp\\prototype_File.docx");
String[] mailMergeFieldsArray = {"sys_date","details2_details_90010","Value_3_90010","name_value_1_t_90164_lv_3","name_value_2_90144","name_value_1_90144","date_from_90144"};
String[] hebrewMailMergeValuesArray = {"27.06.2010","מנהל פיתוח","029651247","מנהל פיתוח","פיתוח","שמואל מזרחי","27.06.2010"};
String[] englishMailMergeValuesArray = {"27.06.2010","shmoel mizrachi","029651247","develop","department manager","senior manager ","27.06.2010"};
prototypeFile4hebrew.getMailMerge().execute(mailMergeFieldsArray, hebrewMailMergeValuesArray);
prototypeFile4hebrew.save("C:\\Temp\\bad_hebrew_Merged.docx", SaveFormat.DOCX);
prototypeFile4hebrew.save("C:\\Temp\\bad_hebrew_Merged.doc", SaveFormat.DOC);
prototypeFile4English.getMailMerge().execute(mailMergeFieldsArray, englishMailMergeValuesArray);
prototypeFile4English.save("C:\\Temp\\bad_english_Merged.docx", SaveFormat.DOCX);
prototypeFile4English.save("C:\\Temp\\bad_english_Merged.doc", SaveFormat.DOC);

It seems, it can be problem with encoding on your side.
I send the output documents produced on my side to your e-mail.
Best regards,

Hellow Mr. moskov
I am very appreciate your quick answer and checking my code also.
Can you tell our system team / me hwo to fix that encoding problem?
By java code or something else?
I forgot to tell you that I am using last Aspose.Words.jdk14.jar (not the Aspose.Words.jdk15.jar or Aspose.Words.jdk16.jar).
Best regards
Shmoel

Hello
Thanks for your inquiry. Could you please attach the documents produced with the latest version of Aspose.Words for Java on your side?
Best regards,

Hellow Mr. Noskov,
The documents produced with the last Aspose.Words.jdk14.jar from 04/03/2010 attached at that post.
Best regurds

Hello
Thank you for additional information. But I still cannot reproduce the problem on my side. Could you please provide me details of your develop environment?
Best regards,

Good morning Mr. Noskov,
We use the oracle Jdeveloper 9.0.5.2 , java version 1.4.2_03.
I have attached The SystemDetails.txt file which represent details of my develop environment.
Best regards,
Shmoel

Hello

Thank you for additional information. But I still cannot reproduce the problem on my side. Could you please try running your code on other PC and let me know how it goes.
Best regards,

Good morning Mr. Nostov,
I have tried to run my code on other PC (on our server) and the result was the same as on my machine.
Best regards,
Shmoel

Hello Shmoel
Thank you for additional information. The problem might occur while getting data from your data source. What kind of data source do you use? Is it database or XML file or something else? Could you please provide us with a simple data source you use and code, which you use to get data from it? I hope this will allow us to reproduce the problem.
Also, please check whether data from your data source comes properly.
Best regards,

Dear Mr Nostov,
I apologise for not responding sooner – I have just returned from my vacation today.
Regarding the data source, we extract data from an Oracle 10g database. However this is not relevant to this particular problem. In the code that I sent you, I deliberately removed any interaction with the database and hard coded the data into the code. However the problem of unformatted and distorted documents still occurs.
Regards
Shmoel Mizrachi

Hi Shmoel,
Thanks for this additional information. Similar to Andrey’s result, I was unable to reproduce any issue on my side. Are you able to run your test project on another computer, prehaps one with a different setup and see if the issue occurs there?
Thanks,