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

Boolean

Licensing Info

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

The following example will place the Label in the top-left of the page with IgnoreMargin
using 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);
    }
}

See Also

PageElement
ceTe.DynamicPDF

In this topic