Skip to main content

HtmlAreaPadding

Version: 12.0

cete.dynamicpdf.pageelements.html.htmlareapadding

HtmlAreaPadding​

Represents a HTML Area element padding.

public class HtmlAreaPadding
Public Class HtmlAreaPadding

Inheritance: Object → HtmlAreaPadding

Licensing Info​

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

Examples​

This example shows simple HTML being displayed on the page.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Html

Module MyModule
Sub Main()
' Create a PageDimensions Dim MyDimensions As PageDimensions = New PageDimensions(PageSize.Letter, PageOrientation.Portrait,50.0f)
' Create a HtmlAreaPadding. Dim MyPadding As HtmlAreaPadding = New HtmlAreaPadding(20.0f, 0.0f, 20.0f, 0.0f)
' Create a file path Dim MyFilePath As String = "C:\Temp\TestPage.html"
' Create a PDF Document Dim MyDocument As Document = Document.FromHtml(MyFilePath, MyDimensions, MyPadding)
' Save the PDF MyDocument.Draw("MyOutput.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Html;

public class Example
{
public static void CreatePDF(string inputHTMLPath, string outputPath)
{
// Create a PageDimensions
PageDimensions dimensions = new PageDimensions(PageSize.Letter, PageOrientation.Portrait,50.0f);

// Create a HtmlAreaPadding.
HtmlAreaPadding padding = new HtmlAreaPadding(20.0f, 0.0f, 20.0f, 0.0f);

// Create a PDF Document
Document document = Document.FromHtml(inputHTMLPath, dimensions, padding);

// Save the PDF
document.Draw(outputPath);
}
}

Remarks​

This class can be used to place padding on a HTML Area.

Constructors​

HtmlAreaPadding(Single)​

Initializes a new instance of the HtmlAreaPadding class.

public HtmlAreaPadding(float padding)
Public Sub New (padding As Single)

Parameters​

Padding of the four sides of HTML Area.

Licensing Info​

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

HtmlAreaPadding(Single, Single, Single, Single)​

Initializes a new instance of the HtmlAreaPadding class.

public HtmlAreaPadding(float top, float right, float bottom, float left)
Public Sub New (top As Single, right As Single, bottom As Single, left As Single)

Parameters​

top padding of the HTML Area.

right padding of the HTML Area.

bottom padding of the HTML Area.

left padding of the HTML Area.

Licensing Info​

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

Properties​

Bottom​

Gets or Sets the bottom padding of the HTML Area.

public float Bottom { get; set; }
Public Property Bottom As Single

Property Value​

Single

Licensing Info​

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

Left​

Gets or Sets the left padding of the HTML Area.

public float Left { get; set; }
Public Property Left As Single

Property Value​

Single

Licensing Info​

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

Gets or Sets the right padding of the HTML Area.

public float Right { get; set; }
Public Property Right As Single

Property Value​

Single

Licensing Info​

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

Top​

Gets or Sets the top padding of the HTML Area.

public float Top { get; set; }
Public Property Top As Single

Property Value​

Single

Licensing Info​

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

Methods​

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

Licensing Info​

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

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

Licensing Info​

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

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

Licensing Info​

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

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

Licensing Info​

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

See Also​

ceTe.DynamicPDF.PageElements.Html