We are using the full version of Spire.DOC to manipulate and then print a Word document created from a DOTX. If we look at the resulting document in Word it is fine, but when printed from Spire.DOC on the application server (which does not have Word installed) the formatting is all skewed; for example headers and footers are wrong and any text box are printed in line in the document rather than in their proper places. Here is the code we're using:
- Code: Select all
Document doc = new Document();
doc.LoadFromFile(docpath);
PrintDocument printDoc = doc.PrintDocument;
printDoc.PrintController = new StandardPrintController();
printDoc.DocumentName = string.Format("WAL_DOC_{0}", id);
printDoc.DocumentName = printDoc.DocumentName + username;
printDoc.Print();
Is there something wrong with this approach?
Regards,
Mike