ExcelWorksheetConversionOptions Constructors
Overloads
ExcelWorksheetConversionOptions(Boolean) | Initializes a new instance of the ExcelWorksheetConversionOptions class |
ExcelWorksheetConversionOptions(ExcelPageSize, Double) | Initializes a new instance of the ExcelWorksheetConversionOptions class |
ExcelWorksheetConversionOptions(ExcelPageSize, Double, Double) | Initializes a new instance of the ExcelWorksheetConversionOptions class. |
ExcelWorksheetConversionOptions(ExcelPageSize, PageOrientation?, Double) | Initializes a new instance of the ExcelWorksheetConversionOptions class. |
ExcelWorksheetConversionOptions(ExcelPageSize, PageOrientation?, Double, Double) | Initializes a new instance of the ExcelWorksheetConversionOptions class. |
ExcelWorksheetConversionOptions(ExcelWorksheetConversionOptions) | Initializes a new instance of the ExcelWorksheetConversionOptions class |
ExcelWorksheetConversionOptions(Boolean)
Initializes a new instance of the ExcelWorksheetConversionOptions class
public ExcelWorksheetConversionOptions(bool defaultToFile)
Public Sub New (defaultToFile As Boolean)
Parameters
- defaultToFile
- Boolean
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to ExcelWorksheetConversionOptions constructor with defaultToFile as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx")
' Events to know if conversion completed successfully or not
AddHandler excelConversionDocumentParsing, AddressOf xlConverter_DocumentParsing
' Call Convert method to start conversion
excelConversion.Convert("C:\MyOutput.pdf")
End Sub
Sub xlConverter_DocumentParsing(ByVal sender As Object, ByVal e As ExcelDocumentParsingEventArgs)
For Each excelWorksheet As ExcelWorksheet In e.Worksheets
Dim excelWSOptions As ExcelWorksheetConversionOptions = New ExcelWoorksheetConversionOptions(True)
excelWorksheet.ConversionOptions=excelWSOptions
Next
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// Create new instance of Converter by providing suitable parameters.
ExcelConverter excelConverter = new ExcelConverter(@"C:\MyDocument.xlsx");
excelConverter.DocumentParsing += new ExcelDocumentParsing(xlConverter_DocumentParsing);
//Call Convert method to start conversion
excelConverter.Convert(@"C:\MyOutput.pdf");
}
static void xlConverter_DocumentParsing(object sender, ExcelDocumentParsingEventArgs e)
{
foreach (ExcelWorksheet excelWorksheet in e.Worksheets)
{
ExcelWorksheetConversionOptions excelWSOptions = new ExcelWorksheetConversionOptions(true);
excelWorksheet.ConversionOptions=excelWSOptions;
}
}
}
ExcelWorksheetConversionOptions(ExcelPageSize, Double)
Initializes a new instance of the ExcelWorksheetConversionOptions class
public ExcelWorksheetConversionOptions(ExcelPageSize pageSize, double margins)
Public Sub New (pageSize As ExcelPageSize, margins As Double)
Parameters
- pageSize
- ExcelPageSize
Size of the page
- margins
- Double
margins given in points
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to ExcelWorksheetConversionOptions constructor with ExcelPageSize and margin as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx")
' Events to know if conversion completed successfully or not
AddHandler excelConversionDocumentParsing, AddressOf xlConverter_DocumentParsing
' Call Convert method to start conversion
excelConversion.Convert("C:\MyOutput.pdf")
End Sub
Sub xlConverter_DocumentParsing(ByVal sender As Object, ByVal e As ExcelDocumentParsingEventArgs)
For Each excelWorksheet As ExcelWorksheet In e.Worksheets
Dim excelWSOptions As ExcelWorksheetConversionOptions = New ExcelWoorksheetConversionOptions(ExcelPageSize.A4,50)
excelWSOptions.DefaultToFile=True
excelWorksheet.ConversionOptions=excelWSOptions
Next
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// Create new instance of Converter by providing suitable parameters.
ExcelConverter excelConverter = new ExcelConverter(@"C:\MyDocument.xlsx");
excelConverter.DocumentParsing += new ExcelDocumentParsing(xlConverter_DocumentParsing);
//Call Convert method to start conversion
excelConverter.Convert(@"C:\MyOutput.pdf");
}
static void xlConverter_DocumentParsing(object sender, ExcelDocumentParsingEventArgs e)
{
foreach (ExcelWorksheet excelWorksheet in e.Worksheets)
{
ExcelWorksheetConversionOptions excelWSOptions = new ExcelWorksheetConversionOptions(ExcelPageSize.A4,50);
excelWSOptions.DefaultToFile=true;
excelWorksheet.ConversionOptions=excelWSOptions;
}
}
}
ExcelWorksheetConversionOptions(ExcelPageSize, Double, Double)
Initializes a new instance of the ExcelWorksheetConversionOptions class.
public ExcelWorksheetConversionOptions(ExcelPageSize pageSize, double leftAndRightMargin, double topAndBottomMargin)
Public Sub New (pageSize As ExcelPageSize, leftAndRightMargin As Double, topAndBottomMargin As Double)
Parameters
- pageSize
- ExcelPageSize
size of the page
- leftAndRightMargin
- Double
The left and right margins of the page in points
- topAndBottomMargin
- Double
The top and bottom margins of the page in points
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to ExcelWorksheetConversionOptions constructor with ExcelPageSize, leftAndRightmargin and topAndBottommargin as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx")
' Events to know if conversion completed successfully or not
AddHandler excelConversionDocumentParsing, AddressOf xlConverter_DocumentParsing
' Call Convert method to start conversion
excelConversion.Convert("C:\MyOutput.pdf")
End Sub
Sub xlConverter_DocumentParsing(ByVal sender As Object, ByVal e As ExcelDocumentParsingEventArgs)
For Each excelWorksheet As ExcelWorksheet In e.Worksheets
Dim excelWSOptions As ExcelWorksheetConversionOptions = New ExcelWoorksheetConversionOptions(ExcelPageSize.A4,50,100)
excelWSOptions.DefaultToFile=True
excelWorksheet.ConversionOptions=excelWSOptions
Next
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// Create new instance of Converter by providing suitable parameters.
ExcelConverter excelConverter = new ExcelConverter(@"C:\MyDocument.xlsx");
excelConverter.DocumentParsing += new ExcelDocumentParsing(xlConverter_DocumentParsing);
//Call Convert method to start conversion
excelConverter.Convert(@"C:\MyOutput.pdf");
}
static void xlConverter_DocumentParsing(object sender, ExcelDocumentParsingEventArgs e)
{
foreach (ExcelWorksheet excelWorksheet in e.Worksheets)
{
ExcelWorksheetConversionOptions excelWSOptions = new ExcelWorksheetConversionOptions(ExcelPageSize.A4,50,100);
excelWSOptions.DefaultToFile=true;
excelWorksheet.ConversionOptions=excelWSOptions;
}
}
}
ExcelWorksheetConversionOptions(ExcelPageSize, PageOrientation?, Double)
Initializes a new instance of the ExcelWorksheetConversionOptions class.
public ExcelWorksheetConversionOptions(ExcelPageSize pageSize, PageOrientation? orientation, double margin)
Public Sub New (pageSize As ExcelPageSize, orientation As PageOrientation?, margin As Double)
Parameters
- pageSize
- ExcelPageSize
Size of the page
- orientation
- PageOrientation?
Orientation of the page
- margin
- Double
Margin of the page in points
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to ExcelWorksheetConversionOptions constructor with ExcelPageSize, pageOrientation and margin as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx")
' Events to know if conversion completed successfully or not
AddHandler excelConversionDocumentParsing, AddressOf xlConverter_DocumentParsing
' Call Convert method to start conversion
excelConversion.Convert("C:\MyOutput.pdf")
End Sub
Sub xlConverter_DocumentParsing(ByVal sender As Object, ByVal e As ExcelDocumentParsingEventArgs)
For Each excelWorksheet As ExcelWorksheet In e.Worksheets
Dim excelWSOptions As ExcelWorksheetConversionOptions = New ExcelWoorksheetConversionOptions(ExcelPageSize.A4,PageOrientation.Portrait,50)
excelWSOptions.DefaultToFile=True
excelWorksheet.ConversionOptions=excelWSOptions
Next
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// Create new instance of Converter by providing suitable parameters.
ExcelConverter excelConverter = new ExcelConverter(@"C:\MyDocument.xlsx");
excelConverter.DocumentParsing += new ExcelDocumentParsing(xlConverter_DocumentParsing);
//Call Convert method to start conversion
excelConverter.Convert(@"C:\MyOutput.pdf");
}
static void xlConverter_DocumentParsing(object sender, ExcelDocumentParsingEventArgs e)
{
foreach (ExcelWorksheet excelWorksheet in e.Worksheets)
{
ExcelWorksheetConversionOptions excelWSOptions = new ExcelWorksheetConversionOptions(ExcelPageSize.A4,PageOrientation.Portrait,50);
excelWSOptions.DefaultToFile=true;
excelWorksheet.ConversionOptions=excelWSOptions;
}
}
}
ExcelWorksheetConversionOptions(ExcelPageSize, PageOrientation?, Double, Double)
Initializes a new instance of the ExcelWorksheetConversionOptions class.
public ExcelWorksheetConversionOptions(ExcelPageSize pageSize, PageOrientation? orientation, double leftAndRightMargin, double topAndBottomMargin)
Public Sub New (pageSize As ExcelPageSize, orientation As PageOrientation?, leftAndRightMargin As Double, topAndBottomMargin As Double)
Parameters
- pageSize
- ExcelPageSize
size of the page
- orientation
- PageOrientation?
orientation of the page
- leftAndRightMargin
- Double
The left and right margins of the page in points
- topAndBottomMargin
- Double
The top and bottom margins of the page in points
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to ExcelWorksheetConversionOptions constructor with ExcelPageSize, PageOrientation, LeftAndRightMargin and TopAndBottomMargin as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx")
' Events to know if conversion completed successfully or not
AddHandler excelConversionDocumentParsing, AddressOf xlConverter_DocumentParsing
' Call Convert method to start conversion
excelConversion.Convert("C:\MyOutput.pdf")
End Sub
Sub xlConverter_DocumentParsing(ByVal sender As Object, ByVal e As ExcelDocumentParsingEventArgs)
For Each excelWorksheet As ExcelWorksheet In e.Worksheets
Dim excelWSOptions As ExcelWorksheetConversionOptions = New ExcelWoorksheetConversionOptions(ExcelPageSize.A4,PageOrientation.Portrait,100,50)
excelWSOptions.DefaultToFile=True
excelWorksheet.ConversionOptions=excelWSOptions
Next
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// Create new instance of Converter by providing suitable parameters.
ExcelConverter excelConverter = new ExcelConverter(@"C:\MyDocument.xlsx");
excelConverter.DocumentParsing += new ExcelDocumentParsing(xlConverter_DocumentParsing);
//Call Convert method to start conversion
excelConverter.Convert(@"C:\MyOutput.pdf");
}
static void xlConverter_DocumentParsing(object sender, ExcelDocumentParsingEventArgs e)
{
foreach (ExcelWorksheet excelWorksheet in e.Worksheets)
{
ExcelWorksheetConversionOptions excelWSOptions = new ExcelWorksheetConversionOptions(ExcelPageSize.A4,PageOrientation.Portrait,100,50);
excelWSOptions.DefaultToFile=true;
excelWorksheet.ConversionOptions=excelWSOptions;
}
}
}
ExcelWorksheetConversionOptions(ExcelWorksheetConversionOptions)
Initializes a new instance of the ExcelWorksheetConversionOptions class
public ExcelWorksheetConversionOptions(ExcelWorksheetConversionOptions xlWorkSheetOptions)
Public Sub New (xlWorkSheetOptions As ExcelWorksheetConversionOptions)
Parameters
- xlWorkSheetOptions
- ExcelWorksheetConversionOptions
instance of the ExcelWorksheetConversionOptions class
Licensing Info
This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.