PageElement.IgnoreMargins Property
Gets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property.
public bool IgnoreMargins { get; set; }
Public Property IgnoreMargins As Boolean
Property Value
Licensing Info
This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Examples
The following example will place the Label in the top-left of the page with IgnoreMarginusing ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
public class Example
{
    public static void CreatePDF(string outputPath)
    {   
        // Create a PDF Document
        Document document = new Document();
        
        // Create a Page and add it to the document
        Page page = new Page();
        document.Pages.Add(page);
		
		// Create an Label and place it in page top left with margin ignored
        Label label = new Label("I am placed in Page top left with margin ignored", 0, 0, 160, 30);
        label.RelativeTo = RelativeTo.TopLeft;
        label.IgnoreMargin=true;
		page.Elements.Add(label);
        // Save the PDF
        document.Draw(outputPath);
    }
}