cete.dynamicpdf.conversion.htmlconversionoptions
HtmlConversionOptions
- Namespace: ceTe.DynamicPDF.Conversion
- Assemblies: ceTe.DynamicPDF.Converter.40.dll
Represents the HTML string conversion options.
public class HtmlConversionOptions : ConversionOptions, ISerializable
Public Class HtmlConversionOptions
Inherits ConversionOptions
Implements ISerializable
Inheritance: Object → ConversionOptions → HtmlConversionOptions
Implements: ISerializable
Constructors
HtmlConversionOptions(Boolean)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(bool appendToPdf)
Public Sub New (appendToPdf As Boolean)
Parameters
- appendToPdf: Boolean
Specify if append option to be enabled.
Examples
This example shows how to provide conversion options for HTML string conversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new HtmlConversionOptions(True)
' Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, "C:\MyOutput.pdf", htmlConversionOptions)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(true);
// Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, @"C:\MyOutput.pdf", htmlConversionOptions);
}
}
HtmlConversionOptions(Boolean, String)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(bool appendToPdf, string basePath)
Public Sub New (appendToPdf As Boolean, basePath As String)
Parameters
- appendToPdf: Boolean
Specify if append option to be enabled.
- basePath: String
Base path to be passed along with the HTML string.
Examples
This example shows how to provide conversion options for HTML string conversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new HtmlConversionOptions(True,"base Path")
' Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, "C:\MyOutput.pdf", htmlConversionOptions)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(true, "base path");
// Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, @"C:\MyOutput.pdf", htmlConversionOptions);
}
}
HtmlConversionOptions(Double, Double, Double)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(double width, double height, double margins)
Public Sub New (width As Double, height As Double, margins As Double)
Parameters
- width: Double
The width of the page in points.
- height: Double
The height of the page in points.
- margins: Double
The margins of the page in points.
Examples
This example shows how to provide conversion options for HTML string conversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new HtmlConversionOptions(500,600,50)
' Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, "C:\MyOutput.pdf", htmlConversionOptions)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(500,600,50);
// Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, @"C:\MyOutput.pdf", htmlConversionOptions);
}
}
HtmlConversionOptions(Double, Double, Double, Double)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(double width, double height, double leftAndRightMargins, double topAndBottomMargins)
Public Sub New (width As Double, height As Double, leftAndRightMargins As Double, topAndBottomMargins As Double)
Parameters
- width: Double
The width of the page in points.
- height: Double
The height of the page in points.
- leftAndRightMargins: Double
The left and right margins of the page in points.
- topAndBottomMargins: Double
The top and bottom margins of the page in points.
Examples
This example shows how to provide conversion options for HTML string conversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new HtmlConversionOptions(500,600,50,50)
' Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, "C:\MyOutput.pdf", htmlConversionOptions)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(500,600,50,50);
// Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, @"C:\MyOutput.pdf", htmlConversionOptions);
}
}
HtmlConversionOptions(Double, Double, Double, Double, Boolean)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(double width, double height, double leftAndRightMargins, double topAndBottomMargins, bool appendToPdf)
Public Sub New (width As Double, height As Double, leftAndRightMargins As Double, topAndBottomMargins As Double, appendToPdf As Boolean)
Parameters
- width: Double
The width of the page in points.
- height: Double
The height of the page in points.
- leftAndRightMargins: Double
The left and right margins of the page in points.
- topAndBottomMargins: Double
The top and bottom margins of the page in points.
- appendToPdf: Boolean
Specify if append option to be enabled.
Examples
This example shows how to provide HTML conversion options.
Imports ceTe.DynamicPDF.Conversion
Imports System.IO
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new HtmlConversionOptions(600,700, 50,50,True)
Dim appendToPdf() As Byte = File.ReadAllBytes("C:\MyDocument.pdf")
' Call ConvertHTMLString method to do conversion
Dim MyData() As Byte = Converter.ConvertHTMLString(htmlString, htmlConversionOptions, appendToPdf)
End Sub
End Module
using System;
using System.IO;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(600,700, 50,50,true);
byte[] appendToPdf = File.ReadAllBytes(@"C:\MyDocument.pdf");
// Call ConvertHTMLString method to do conversion
byte[] MyData =Converter.ConvertHTMLString(htmlString, htmlConversionOptions, appendToPdf);
}
}
HtmlConversionOptions(Double, Double, Double, Double, Boolean, String)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(double width, double height, double leftAndRightMargins, double topAndBottomMargins, bool appendToPdf, string basePath)
Public Sub New (width As Double, height As Double, leftAndRightMargins As Double, topAndBottomMargins As Double, appendToPdf As Boolean, basePath As String)
Parameters
- width: Double
The width of the page in points.
- height: Double
The height of the page in points.
- leftAndRightMargins: Double
The left and right margins of the page in points.
- topAndBottomMargins: Double
The top and bottom margins of the page in points.
- appendToPdf: Boolean
Specify if append option to be enabled.
- basePath: String
Base path to be passed along with the HTML string.
Examples
This example shows how to provide HTML conversion options.
Imports ceTe.DynamicPDF.Conversion
Imports System.IO
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new HtmlConversionOptions(600,700, 50,50,True,"basepath")
Dim appendToPdf() As Byte = File.ReadAllBytes("C:\MyDocument.pdf")
' Call ConvertHTMLString method to do conversion
Dim MyData() As Byte = Converter.ConvertHTMLString(htmlString, htmlConversionOptions, appendToPdf)
End Sub
End Module
using System;
using System.IO;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(600,700, 50,50,true, "basepath");
byte[] appendToPdf = File.ReadAllBytes(@"C:\MyDocument.pdf");
// Call ConvertHTMLString method to do conversion
byte[] MyData =Converter.ConvertHTMLString(htmlString, htmlConversionOptions, appendToPdf);
}
}
HtmlConversionOptions(Double, Double, Double, Double, String)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(double width, double height, double leftAndRightMargins, double topAndBottomMargins, string basePath)
Public Sub New (width As Double, height As Double, leftAndRightMargins As Double, topAndBottomMargins As Double, basePath As String)
Parameters
- width: Double
The width of the page in points.
- height: Double
The height of the page in points.
- leftAndRightMargins: Double
The left and right margins of the page in points.
- topAndBottomMargins: Double
The top and bottom margins of the page in points.
- basePath: String
Base path to be passed along with the HTML string.
Examples
This example shows how to provide conversion options for HTML string conversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new HtmlConversionOptions(500,600,50,50,"basepath")
' Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, "C:\MyOutput.pdf", htmlConversionOptions)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(500,600,50,50,"basepath");
// Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, @"C:\MyOutput.pdf", htmlConversionOptions);
}
}
HtmlConversionOptions(Double, Double, Double, String)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(double width, double height, double margins, string basePath)
Public Sub New (width As Double, height As Double, margins As Double, basePath As String)
Parameters
- width: Double
The width of the page in points.
- height: Double
The height of the page in points.
- margins: Double
The margins of the page in points.
- basePath: String
Base path to be passed along with the HTML string.
Examples
This example shows how to provide conversion options for HTML string conversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new HtmlConversionOptions(500,600,50,"basepath")
' Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, "C:\MyOutput.pdf", htmlConversionOptions)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(500,600,50,"basePath");
// Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, @"C:\MyOutput.pdf", htmlConversionOptions);
}
}
HtmlConversionOptions(PageSize, PageOrientation, Double)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(PageSize size, PageOrientation orientation, double margins)
Public Sub New (size As PageSize, orientation As PageOrientation, margins As Double)
Parameters
- size: PageSize
The size of the page.
- orientation: PageOrientation
The orientation of the page.
- margins: Double
The margins of the page in points.
Examples
This example shows how to provide conversion options for HTML string conversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new (PageSize.Letter,PageOrientation.Portrait, 50)
' Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, "C:\MyOutput.pdf", htmlConversionOptions)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(PageSize.Letter,PageOrientation.Portrait, 50);
// Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, @"C:\MyOutput.pdf", htmlConversionOptions);
}
}
HtmlConversionOptions(PageSize, PageOrientation, Double, Double, Boolean)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(PageSize size, PageOrientation orientation, double leftAndRightMargins, double topAndBottomMargins, bool appendToPdf)
Public Sub New (size As PageSize, orientation As PageOrientation, leftAndRightMargins As Double, topAndBottomMargins As Double, appendToPdf As Boolean)
Parameters
- size: PageSize
The size of the page.
- orientation: PageOrientation
The orientation of the page.
- leftAndRightMargins: Double
The left and right margins of the page in points.
- topAndBottomMargins: Double
The top and bottom margins of the page in points.
- appendToPdf: Boolean
Specify if append option to be enabled.
Examples
This example shows how to provide conversion options for HTML string conversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new (PageSize.Letter,PageOrientation.Portrait, 50,50,True)
' Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, "C:\MyOutput.pdf", htmlConversionOptions)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(PageSize.Letter,PageOrientation.Portrait, 50,50,true);
// Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, @"C:\MyOutput.pdf", htmlConversionOptions);
}
}
HtmlConversionOptions(PageSize, PageOrientation, Double, Double, Boolean, String)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(PageSize size, PageOrientation orientation, double leftAndRightMargins, double topAndBottomMargins, bool appendToPdf, string basePath)
Public Sub New (size As PageSize, orientation As PageOrientation, leftAndRightMargins As Double, topAndBottomMargins As Double, appendToPdf As Boolean, basePath As String)
Parameters
- size: PageSize
The size of the page.
- orientation: PageOrientation
The orientation of the page.
- leftAndRightMargins: Double
The left and right margins of the page in points.
- topAndBottomMargins: Double
The top and bottom margins of the page in points.
- appendToPdf: Boolean
Specify if append option to be enabled.
- basePath: String
Base path to be passed along with the HTML string.
Examples
This example shows how to provide conversion options for HTML string conversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new (PageSize.Letter,PageOrientation.Portrait, 50,50,True,"basepath")
' Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, "C:\MyOutput.pdf", htmlConversionOptions)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(PageSize.Letter,PageOrientation.Portrait, 50,50,true, "basepath");
// Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, @"C:\MyOutput.pdf", htmlConversionOptions);
}
}
HtmlConversionOptions(PageSize, PageOrientation, Double, String)
Initializes a new instance of the HtmlConversionOptions class.
public HtmlConversionOptions(PageSize size, PageOrientation orientation, double margins, string basePath)
Public Sub New (size As PageSize, orientation As PageOrientation, margins As Double, basePath As String)
Parameters
- size: PageSize
The size of the page.
- orientation: PageOrientation
The orientation of the page.
- margins: Double
The margins of the page in points.
- basePath: String
Base path to be passed along with the HTML string.
Examples
This example shows how to provide conversion options for HTML string conversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim htmlString As String = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>"
' Create a instance of HtmlConversionOptions class.
Dim htmlConversionOptions As HtmlConversionOptions = new (PageSize.Letter,PageOrientation.Portrait, 50,"basepath")
' Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, "C:\MyOutput.pdf", htmlConversionOptions)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
string htmlString = "<html><head><title>ceTe software</title></head><body>DynamicPDF Converter</body></html>";
// Create a instance of HtmlConversionOptions class.
HtmlConversionOptions htmlConversionOptions = new HtmlConversionOptions(PageSize.Letter,PageOrientation.Portrait, 50,"basepath");
// Call ConvertHTMLString method to do conversion
Converter.ConvertHTMLString(htmlString, @"C:\MyOutput.pdf", htmlConversionOptions);
}
}
Properties
AppendToPdf
Gets or sets the boolean value to specify if append option to be appended. (Inherited from ConversionOptions)
public bool AppendToPdf { get; set; }
Public Property AppendToPdf As Boolean
Property Value
Author
Gets or sets the author meta data for the converted PDF. (Inherited from ConversionOptions)
public string Author { get; set; }
Public Property Author As String
Property Value
BottomMargin
Gets or sets the bottom margin of the page. (Inherited from ConversionOptions)
public double BottomMargin { get; set; }
Public Property BottomMargin As Double
Property Value
Creator
Gets or sets the creator meta data for the converted PDF. (Inherited from ConversionOptions)
public string Creator { get; set; }
Public Property Creator As String
Property Value
Height
Gets or sets the height of the page in points. (Inherited from ConversionOptions)
public double Height { get; set; }
Public Property Height As Double
Property Value
Keywords
Gets or sets the keywords meta data for the converted PDF. (Inherited from ConversionOptions)
public string Keywords { get; set; }
Public Property Keywords As String
Property Value
LeftMargin
Gets or sets the left margin of the page in points. (Inherited from ConversionOptions)
public double LeftMargin { get; set; }
Public Property LeftMargin As Double
Property Value
PaperKind
Gets or sets paper kind for the pages properties. (Inherited from ConversionOptions)
public PaperKind PaperKind { get; set; }
Public Property PaperKind As PaperKind
Property Value
Producer
Gets or sets the producer meta data for the converted PDF. (Inherited from ConversionOptions)
public string Producer { get; set; }
Public Property Producer As String
Property Value
RightMargin
Gets or sets the right margin of the page in points. (Inherited from ConversionOptions)
public double RightMargin { get; set; }
Public Property RightMargin As Double
Property Value
Subject
Gets or sets the subject meta data for the converted PDF. (Inherited from ConversionOptions)
public string Subject { get; set; }
Public Property Subject As String
Property Value
Title
Gets or sets the title meta data for the converted PDF. (Inherited from ConversionOptions)
public string Title { get; set; }
Public Property Title As String
Property Value
TopMargin
Gets or sets the top margin of the page in points. (Inherited from ConversionOptions)
public double TopMargin { get; set; }
Public Property TopMargin As Double
Property Value
Width
Gets or sets the width of the page in points. (Inherited from ConversionOptions)
public double Width { get; set; }
Public Property Width As Double
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 .
GetObjectData(SerializationInfo, StreamingContext)
Used for serlization of the object. (Inherited from ConversionOptions)
public void GetObjectData(SerializationInfo info, StreamingContext context)
Sub GetObjectData(info As SerializationInfo, context As StreamingContext)
Parameters
-
info: SerializationInfo
-
context: StreamingContext
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 .