We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Improper formatting when saving/printing Word document using Aspose.Words

When I save/print a Word document using the Aspose.Words control formatting of the destination document does not always render properly. TextBox controls and bulleted lists are not properly formatted.





Code sample for save:



Aspose.Words.Document doc = new Aspose.Words.Document(wordPath);

doc.UpdateFields();

doc.Save(Path.Combine(pdfPath, fileName + “.PDF”), Aspose.Words.SaveFormat.Pdf);







Code sample for Printing:

PrinterSettings printSettings = new PrinterSettings();

printSettings.PrinterName = printRequest.PrinterName;

if (printSettings.IsValid)

{

if (printRequest.IsDuplex)

printSettings.Duplex = Duplex.Vertical;



document = new Aspose.Words.Document(printRequest.FileName);

document.UpdateFields();

document.UpdatePageLayout();



printDocument = new Aspose.Words.Rendering.AsposeWordsPrintDocument(document);

printDocument.PrinterSettings = printSettings;

printDocument.Print();

printed = true;

}

I upgraded from version 10.5 to version 14.4 which fixed the textbox rendering issue. Spacing of bulleted lists and a highlighted form field are still not rendering properly. No code changes have been made.

Hi Mike,

Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.


  • Please attach your input Word document.
  • Please attach the output Pdf file that shows the undesired behavior.
  • Please
    attach the screenshots of problematic section of output document.

As soon as you get these pieces of information to
us we’ll start our investigation into your issue.