Hello
I have webform that can generate invoices in word format with aspose words. It uses a template word document wich it performs mailmerge on.
Looks like this:
foreach (Invoice f in invoices)
{
Document doc = new Document("C:\\mall.doc");
string[] fieldNames = { "CompanyName", "Fakturanr", "CompanyAddress", "ZipCode", "CITY", "BetReference" };
object[] fieldValues = { f.Betalare.Namn, f.Fakturanr.ToString(), f.Betalare.Postadr, f.Betalare.Postnr, f.Betalare.Postort, "" };
doc.MailMerge.Execute(fieldNames, fieldValues);
doc.Save("C:\\invoices\\" + f.Fakturanr + ".docx");
}
I dont't want to save each document I just want to convert it to pdf in memory and then add the document pages to a master pdf file with all the invoices. That file is then going to be streamed out to the user.
Is this possible?