How to save as pdf and then update table cells using aspose.words V9.3 and .pdf

I started out a project using aspose.pdf. But, the formating was not as easy as I would like. My next attempt has been to format the document in word with tables that will be updated using linq. The examples in Aspose show this can be done with an intermediate save as xml and then using pdf.GetObjectbyID to find the correct object and updating the pdf. But, in the latest version of .words (9.3 downloaded yesterday), save as xml does not create a readable file that I can find the correct objectID to update. I can’t find any example of how to do this in the newer version. Do I have to use an older version to update? Is there a better way? I want to use your product, but am pretty frustrated right now, and I don’t want to spend any more time in the newer version if I can only do it in an older version. Thanks.
Judy Wilkinson

Hi Judy,

Thanks for your request. Could you please provide me more information about your requirements? What do you mean when say “update table cells”? Could you please attach your input and expected output here for testing? I will investigate it on my side and provide you more information.
Best regards,

Attached is a word doc that I want to update tables using c# in visual studio (V2010) using linq queries and program.cs with my code. I’ve been following the Rental Property table example from the Aspose site. I hope this gives you enough information. I was manually trying to set the data (not from the linq queries) in this test example just to see if it works.
https://docs.aspose.com/words/net/convert-a-document-to-pdf/

Hi Judy,

Thank you for your interest in Aspose.Words and additional information. I think the best way to fill the document with data is using Mail Merge feature. Please follow this link to learn more: https://docs.aspose.com/words/net/types-of-mail-merge-operations/
Or you can use Mail Merge with regions. Please see the following link:
https://docs.aspose.com/words/java/types-of-mail-merge-operations/
I little bit modified your template document and attached it here. Please try using the following code to fill this template with data:

Document doc = new Document("TestInvoiceLayoutForAspose.doc");
string[] fieldNames = { "InvoiceDate", "PolicyNumber", "AlphaCode", "PolicyEffectiveDate", "PaymentDueDate", "Content", "PremiumDueDate" };
string[] fieldValues = { "Test1", "Test2", "Test3", "Test4", "Test5", "Test6", "Test7" };
doc.MailMerge.Execute(fieldNames, fieldValues);
// Save to DOC
doc.Save("out.doc", SaveFormat.Doc);
// Save to PDF
doc.Save("out.pdf", SaveFormat.Pdf);

Hope this helps.
Best regards,

Thanks for your response. I’m going to give it a try. But, I didn’t get the attchment with your revised document (TestInvoiceLayoutForAspose.doc). Can you resend it? I’ll let you know if this works for me … it certainly sounds promising. Thanks.
Judy

Hi Judy,

Thanks for your request. I sent the modified template document and the output document to your e-mail.
Best regards,