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

Free Support Forum - aspose.com

Aspose.Word extra margin

I try build document with Aspose.Words. When i add table and save document as pdf, a have extra margin in right side. Why?

My code:

var document = new Document();
    _builder = new DocumentBuilder(document)
        PageSetup =
            Orientation = Orientation.Portrait,
            PaperSize = PaperSize.A4,
            RightMargin = 0,
            BottomMargin = 0,
            LeftMargin = 0,
            TopMargin = 0

    _builder.Write("Test test test");
    document.Save(stream, SaveFormat.Pdf);

Result (2.8 KB)


Thanks for your inquiry. We have tested the scenario with Aspose.Words for .NET 17.8 and unable to replicate the issue. If you are using some old version then please download and try latest version of Aspose.Words, it will resolve the issue. However, if the issue persists then please share a sample project along with your output document here.
Test.pdf (11.3 KB)