cete.dynamicpdf.pageelements.html.htmlareapadding
HtmlAreaPadding
- Namespace: ceTe.DynamicPDF.PageElements.Html
- Assemblies: ceTe.DynamicPDF.40.dll
Represents a HTML Area element padding.
public class HtmlAreaPadding
Public Class HtmlAreaPadding
Inheritance: Object → HtmlAreaPadding
Licensing
This class is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:
- DynamicPDF Generator for .NET Enterprise Edition
- DynamicPDF Merger for .NET Enterprise Edition
- DynamicPDF ReportWriter for .NET Enterprise Edition
- DynamicPDF Core Suite for .NET Enterprise Edition
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;
using ceTe.DynamicPDF.PageElements.Html;
class MyClass
{
static void Main()
{
// 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 file path
string filePath = @"C:\Temp\TestPage.html";
// Create a PDF Document
Document document = Document.FromHtml(filePath, dimensions, padding);
// Save the PDF
document.Draw("output.pdf");
}
}
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: Single
Padding of the four sides of HTML Area.
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: Single
top padding of the HTML Area.
- right: Single
right padding of the HTML Area.
- bottom: Single
bottom padding of the HTML Area.
- left: Single
left padding of the HTML Area.
Properties
Bottom
Gets or Sets the bottom padding of the HTML Area.
public float Bottom { get; set; }
Public Property Bottom As Single
Property Value
Left
Gets or Sets the left padding of the HTML Area.
public float Left { get; set; }
Public Property Left As Single
Property Value
Right
Gets or Sets the right padding of the HTML Area.
public float Right { get; set; }
Public Property Right As Single
Property Value
Top
Gets or Sets the top padding of the HTML Area.
public float Top { get; set; }
Public Property Top As Single
Property Value
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
- obj: Object
The Object to compare with the current Object .
Returns
true if the specified Object is equal to the current Object ; otherwise, false.
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 .
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.
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 .