cete.dynamicpdf.htmlconverter.unitconverter
UnitConverter
- Namespace: ceTe.DynamicPDF.HtmlConverter
- Assemblies: DynamicPDF.HTMLConverter.dll
Represents the unit conversion.
public class UnitConverter
Public Class UnitConverter
Inheritance: Object → UnitConverter
Licensing Info
This class is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
Constructors
UnitConverter()
Initializes a new instance of the UnitConverter class.
public UnitConverter()
Public Sub New ()
Licensing Info
This constructor is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
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.
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
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 DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
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 DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
InchesToPoints(Double)
Method to convert inches to points.
public static double InchesToPoints(double size)
Shared Function InchesToPoints(size As Double) As Double
Parameters
- size: Double
Size in inches.
Returns
Size in points.
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
MillimetersToPoints(Double)
Method to convert millimeters to points.
public static double MillimetersToPoints(double size)
Shared Function MillimetersToPoints(size As Double) As Double
Parameters
- size: Double
Size in millimeters.
Returns
Size in points.
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
PointsToInches(Double)
Method to convert points to inches.
public static double PointsToInches(double size)
Shared Function PointsToInches(size As Double) As Double
Parameters
- size: Double
Size in points.
Returns
Size in inches.
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
Examples
This example shows how to use UnitConverter class to do unit conversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim width As Double = UnitConverter.InchesToPoints(5.5)
Dim height As Double = UnitConverter.InchesToPoints(7.0)
Dim margin As Double = UnitConverter.InchesToPoints(0.75)
' Create a instance of ConversionOptions
Dim conversionOptions As ConversionOptions = New ConversionOptions(width, height, margin)
' Call convert method to do conversion
Converter.Convert("C:\MyDocument.doc", "C:\MyOutput.pdf", conversionOptions)
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
double height = UnitConverter.InchesToPoints(5.5);
double width = UnitConverter.InchesToPoints(7.0);
double margin = UnitConverter.InchesToPoints(0.75);
// Create a instance of ConversionOptions class.
ConversionOptions option = new ConversionOptions(width, height, margin);
// Call convert method to do conversion.
Converter.Convert(@"C:\MyDocument.doc", @"C:\MyOutput.pdf", option);
}
}
PointsToMillimeters(Double)
Method to convert points to millimeters.
public static double PointsToMillimeters(double size)
Shared Function PointsToMillimeters(size As Double) As Double
Parameters
- size: Double
Size in points.
Returns
Size in millimeters.
Licensing Info
This method is a DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
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 DynamicPDF HTML Converter feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF HTML Converter for .NET v3.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.