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

Free Support Forum - aspose.com

Print from Document.Print differs from Saving the document and printing from Microsoft Word

Using the following code to create TEST.DOCX the output of using doc.Print vs. opening the document in Word and printing to the same printer shows the first 4 lines shift slightly down when using doc.Print.
I am attaching the two document prints from OneNote.
PrintUsingASPOSE.jpg (47.1 KB)
PrintUsingMSWORD.jpg (46.4 KB)

using Aspose.Words;
using System.Drawing.Printing;

namespace ConsoleApp6
{
    class Program
    {
        static void Main(string[] args)
        {
            Aspose.Words.License _wordLicense = new Aspose.Words.License();
            _wordLicense.SetLicense("Aspose.Total.lic");
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);
            double d =ConvertUtil.InchToPoint(3);
            builder.PageSetup.TopMargin = 216;
            builder.Font.Size = 22;
            builder.Font.Name = "Times New Roman";
            builder.ParagraphFormat.LeftIndent = 100;
            builder.ParagraphFormat.TabStops.Add(new TabStop(252, TabAlignment.Left, TabLeader.None));
            builder.ParagraphFormat.LineSpacingRule = LineSpacingRule.Multiple;
            builder.ParagraphFormat.LineSpacing = 13.8; //(115% of 12pt)
            builder.ParagraphFormat.SpaceAfter = 10;
            builder.Writeln("USER:\t"); //builder.InsertBreak(BreakType.ParagraphBreak);
            builder.Writeln("PAGES:\t002"); //builder.InsertBreak(BreakType.ParagraphBreak);
            builder.Writeln("POLICY:\tTESTPOLNO"); //builder.InsertBreak(BreakType.ParagraphBreak);
            builder.Writeln("TESTPOLNO\t"); //builder.InsertBreak(BreakType.ParagraphBreak);
            builder.Writeln("FIRST NAME:\tFINAL"); //builder.InsertBreak(BreakType.ParagraphBreak);
            builder.Writeln("LAST NAME:\tTEST"); //builder.InsertBreak(BreakType.ParagraphBreak);
            builder.Writeln("SSN:\t999999999"); //builder.InsertBreak(BreakType.ParagraphBreak);
            builder.Writeln("DOCTOR:\tPEPPER DR"); //builder.InsertBreak(BreakType.ParagraphBreak);
            doc.Save("TEST.DOCX", SaveFormat.Docx);
            doc.Print("Send To OneNote 2010");            
        }
    }
}

@Bowermml1973

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-18199. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@Bowermml1973

It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-18199) as ‘Not a Bug’.

This issue happens because of MS Word and Aspose.Words has a little bit different rounding numerical values (font size and printer resolution) during rendering/printing document.