We have been using Aspose.Words for years to save Word documents to PDF format for archiving purpose on our Web server.
We recently migrated hosting companies to use Microsoft Azure VM’s running Windows Server 2019 Datacenter. Since then, the formatting on the PDF output is changed. The font width remains unchanged but the line spacing is incresaed so that multiple lines are moved to the next page.
However, this behaviour does not occur on my development PC. The output PDF format is correct. I have now tried 2 different Azure VM’s and the format change occurs on both.
Aspose.Words 18.9 was being used originally but I have now upgraded it to 19.12. The result is the same - works on the dev PC and fails on the Azure Server.
It fails using either .doc or .docx word files.
The code to demonstrate this is simple :
// Open Word Doc
string docfile = @“C:\Testing\Format Test.docx”;
string pdffile = @“C:\Testing\Format Test.pdf”;
Aspose.Words.Document wordDoc = new Aspose.Words.Document(docfile);
// Save as PDF
wordDoc.Save(pdffile, SaveFormat.Pdf);
// free up the document
wordDoc = null;
Is there a new setting required fro Azure Servers?