HtmlAreaPadding
Represents a HTML Area element padding.
public class HtmlAreaPadding
Public Class HtmlAreaPadding
Inheritance: ObjectHtmlAreaPadding
Licensing Info
This class 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
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. |
HtmlAreaPadding(Single, Single, Single, Single) | Initializes a new instance of the HtmlAreaPadding class. |
Properties
Bottom | Gets or Sets the bottom padding of the HTML Area. |
Left | Gets or Sets the left padding of the HTML Area. |
Right | Gets or Sets the right padding of the HTML Area. |
Top | Gets or Sets the top padding of the HTML Area. |
Methods
Equals(Object) | Determines whether the specified Object is equal to the current Object . (Inherited from Object) |
GetHashCode() | Serves as a hash function for a particular type. (Inherited from Object) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
ToString() | Returns a String that represents the current Object . (Inherited from Object) |