Issue with binding the Data


#1

Hi,
when I am converting word document to pdf I am facing the data issue. I have tags in word document and getting the data form the database in the format of list. kindly find the attached pdf file which was generated with empty data. This issue is not occurring every time for some times occurring.

Temp File.pdf (109.7 KB)


#2

@subbusp

Would you kindly share your source Word document along with sample code snippet used for conversion at your side. We will test the scenario in our environment and address it accordingly.


#3

Hi

Kindly find the below alert message is coming while attaching original word document.

image.png (137.1 KB)


#4

@subbusp,

Please first ZIP the Word document and then simply drag and drop the .zip file in reply box. You can also upload the ZIP file to Dropbox and share the Download link here for testing. Thanks for your cooperation.


#5

Kindly find the attached word document and following code to generate document with data.

for (int i = 2; i < Documentlist.Tables[1].Rows.Count; i++)
{
Documentlist.Tables[i].TableName = Documentlist.Tables[1].Rows[i][0].ToString();
document.MailMerge.FieldMergingCallback = new HandleMergeFieldInsertHtml();
Boolean isList = (Boolean)Documentlist.Tables[1].Rows[i][1];
if (isList == false)
{
if (Documentlist.Tables[i].Rows.Count > 0)
document.MailMerge.Execute(Documentlist.Tables[i].Rows[0]);
else
document.MailMerge.CleanupOptions = MailMergeCleanupOptions.RemoveUnusedFields;
}
if (isList == true)
{
if (Documentlist.Tables[i].Rows.Count > 0)
document.MailMerge.ExecuteWithRegions(Documentlist.Tables[i]);
else
document.MailMerge.CleanupOptions = MailMergeCleanupOptions.RemoveUnusedRegions;
}

                        }

Temp Word File.zip (21.5 KB)


#6

@subbusp,

Please also create a standalone simple console application (source code without compilation errors) that helps us to reproduce your current problem on our end and attach it here for testing. Please do not include Aspose.Words DLL files in it to reduce the file size. Thanks for your cooperation.


#7

Temp ConsoleApplication.zip (848.9 KB)
Hi,

find attached console application. and also word template file. kindly change the template file path in application according to your machine path.


#8

@subbusp,

We are checking this scenario and will get back to you soon.


#9

@subbusp,

We have managed to generate the following output PDF file by using your code with Aspose.Words for .NET 19.11 on our end:

We suggest you please upgrade to the latest version of Aspose.Words for .NET i.e. 19.11 and see how it goes on your end. Hope, this helps.

Do you still see any issues in Aspose.Words for .NET 19.11 generated PDF file? If yes, then please also provide a comparison screenshot highlighting the problematic areas in this Aspose.Words 19.11 generated output PDF file (explaining the nature of issues) for further testing. Thanks for your cooperation.