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

Free Support Forum - aspose.com


I’m currently trying to migrate from the older Generator namespace to the DOM.

I can’t seem to find how to do the following, from our old code:

section.PageInfo.PageBorderMargin.Left = borderMarginLeft;

Can you tell me what the DOM equivalent is, please.

Thank you.


Thanks for contacting support.

The Section object used to represents page in a PDF document and in new DOM, the Aspose.Pdf.Page instance represents page instance. Please take a look over following code snippet to fulfill your requirement.


// create Document object
Aspose.Pdf.Document doc = new Document();
// add page to pages collection of PDF Document instance
// set left margin for first page
doc.Pages[1].PageInfo.Margin.Left = 20f;
// Save the output file