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

Free Support Forum - aspose.com

Issue withLeft and Right Margin


We are getting space from left and right in every page. Please see attachment. Please let me know:-

  1. How to avoid this space/indent?
  2. How to set border on every page?
  3. Is there any way to check how much space is remaining in current page so that we can decide to add some content on new page or on current page

We are using Aspose.PDF 18.11 for .NET version.
DPI66305_w109-59-26-PM.pdf (70.4 KB)


Thank you for contacting support.

You may set left, right, top and bottom margins to zero while adding a new page in the document, as under:

Document document = new Document();
Page page = document.Pages.Add();
page.PageInfo.Margin = new MarginInfo(0, 0, 0, 0);

Moreover, we are afraid that blank space may not be checked while adding text on a page, however a new page is automatically added once the content overflows from some page. You may also visit Working with Pages for your kind reference.

We hope this will be helpful. Please feel free to contact us if you need any further assistance.