Skip to main content

FitExcelPageScaling

Version: 3.0

cete.dynamicpdf.conversion.fitexcelpagescaling

FitExcelPageScaling​

Represents all the properties and methods that are needed to change the excel page size to fit the page

public class FitExcelPageScaling
Public Class FitExcelPageScaling

Inheritance: Object → FitExcelPageScaling

Licensing Info​

This class is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:

Examples​

Example shows how to use FitExcelPageScaling class.

Imports ceTe.DynamicPDF.Conversion

Module Module1

Sub Main()

' Create new instance of conversionOptions.
Dim conversionOptions As ExcelConversionOptions = New ExcelConversionOptions(ExcelPageSize.A4,10,10)
Dim fitExcelPageScaling As fitExcelPageScaling = New FitExcelPageScaling(1,1)
Dim excelPageScaling As ExcelPageScaling = New ExcelPageScaling()
excelPageScaling.FitExcelPageScaling = fitExcelPageScaling
conversionOptions.PageScaling = excelPageScaling
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx",conversionOptions)

' Call Convert method to start conversion
excelConversion.Convert("C:\MyOutput.pdf")

End Sub

End Module

using ceTe.DynamicPDF.Conversion;

class MyClass
{
static void Main()
{
//Create new instance of conversionOptions.
ExcelConversionOptions conversionOptions = new ExcelConversionOptions(ExcelPageSize.A4,10,10);
FitExcelPageScaling fitExcelPageScaling = new FitExcelPageScaling(1,1);
ExcelPageScaling excelPageScaling = new ExcelPageScaling();
excelPageScaling.FitExcelPageScaling = fitExcelPageScaling;
conversionOptions.PageScaling = excelPageScaling;

// Create new instance of Converter by providing suitable parameters.
ExcelConverter excelConverter = new ExcelConverter(@"C:\MyDocument.xlsx",conversionOptions);

//Call Convert method to start conversion
excelConverter.Convert(@"C:\MyOutput.pdf");
}
}

Constructors​

FitExcelPageScaling()​

Initializes a new instance of the FitExcelPageScaling class.

public FitExcelPageScaling()
Public Sub New ()

Licensing Info​

This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:

Examples​

Example shows how to use FitExcelPageScaling constructor.

Imports ceTe.DynamicPDF.Conversion

Module Module1

Sub Main()

' Create new instance of conversionOptions.
Dim conversionOptions As ExcelConversionOptions = New ExcelConversionOptions(ExcelPageSize.A4,10,10)
Dim fitExcelPageScaling As fitExcelPageScaling = New FitExcelPageScaling()
fitExcelPageScaling.PagesByTall=1
Dim excelPageScaling As ExcelPageScaling = New ExcelPageScaling()
excelPageScaling.FitExcelPageScaling = fitExcelPageScaling
conversionOptions.PageScaling = excelPageScaling
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx",conversionOptions)

' Call Convert method to start conversion
excelConversion.Convert("C:\MyOutput.pdf")

End Sub

End Module

using ceTe.DynamicPDF.Conversion;

class MyClass
{
static void Main()
{
//Create new instance of conversionOptions.
ExcelConversionOptions conversionOptions = new ExcelConversionOptions(ExcelPageSize.A4,10,10);
FitExcelPageScaling fitExcelPageScaling = new FitExcelPageScaling();
fitExcelPageScaling.PagesByTall=1;
ExcelPageScaling excelPageScaling = new ExcelPageScaling();
excelPageScaling.FitExcelPageScaling = fitExcelPageScaling;
conversionOptions.PageScaling = excelPageScaling;

// Create new instance of Converter by providing suitable parameters.
ExcelConverter excelConverter = new ExcelConverter(@"C:\MyDocument.xlsx",conversionOptions);

//Call Convert method to start conversion
excelConverter.Convert(@"C:\MyOutput.pdf");
}
}

FitExcelPageScaling(FitExcelPageScaling)​

Initializes a new instance of the FitExcelPageScaling class.

public FitExcelPageScaling(FitExcelPageScaling fitExcelPaceScaling)
Public Sub New (fitExcelPaceScaling As FitExcelPageScaling)

Parameters​

Licensing Info​

This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:

FitExcelPageScaling(Int32, Int32)​

Initializes a new instance of the FitExcelPageScaling class.

public FitExcelPageScaling(int fitToPageWide, int fitToPageTall)
Public Sub New (fitToPageWide As Integer, fitToPageTall As Integer)

Parameters​

Sets the number of pages wide the worksheet will be scaled to when it's printed. Applies only to worksheets.

Sets the number of pages tall the worksheet will be scaled to when it's printed. Applies only to worksheets.

Licensing Info​

This constructor is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:

Examples​

Example shows how to use FitExcelPageScaling constructor.

Imports ceTe.DynamicPDF.Conversion

Module Module1

Sub Main()

' Create new instance of conversionOptions.
Dim conversionOptions As ExcelConversionOptions = New ExcelConversionOptions(ExcelPageSize.A4,10,10)
Dim fitExcelPageScaling As fitExcelPageScaling = New FitExcelPageScaling(1,1)
Dim excelPageScaling As ExcelPageScaling = New ExcelPageScaling()
excelPageScaling.FitExcelPageScaling = fitExcelPageScaling
conversionOptions.PageScaling = excelPageScaling
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx",conversionOptions)

' Call Convert method to start conversion
excelConversion.Convert("C:\MyOutput.pdf")

End Sub

End Module

using ceTe.DynamicPDF.Conversion;

class MyClass
{
static void Main()
{
//Create new instance of conversionOptions.
ExcelConversionOptions conversionOptions = new ExcelConversionOptions(ExcelPageSize.A4,10,10);
FitExcelPageScaling fitExcelPageScaling = new FitExcelPageScaling(1,1);
ExcelPageScaling excelPageScaling = new ExcelPageScaling();
excelPageScaling.FitExcelPageScaling = fitExcelPageScaling;
conversionOptions.PageScaling = excelPageScaling;

// Create new instance of Converter by providing suitable parameters.
ExcelConverter excelConverter = new ExcelConverter(@"C:\MyDocument.xlsx",conversionOptions);

//Call Convert method to start conversion
excelConverter.Convert(@"C:\MyOutput.pdf");
}
}

Properties​

PagesByTall​

Returns or sets the number of pages tall the worksheet will be scaled to when it's printed. Applies only to worksheets.

public int PagesByTall { get; set; }
Public Property PagesByTall As Int32

Property Value​

Int32

Licensing Info​

This property is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:

Examples​

Example shows how to use PagesByTall Property.

Imports ceTe.DynamicPDF.Conversion

Module Module1

Sub Main()

' Create new instance of conversionOptions.
Dim conversionOptions As ExcelConversionOptions = New ExcelConversionOptions(ExcelPageSize.A4,10,10)
Dim fitExcelPageScaling As fitExcelPageScaling = New FitExcelPageScaling()
fitExcelPageScaling.PagesByTall=1
Dim excelPageScaling As ExcelPageScaling = New ExcelPageScaling()
excelPageScaling.FitExcelPageScaling = fitExcelPageScaling
conversionOptions.PageScaling = excelPageScaling
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx",conversionOptions)

' Call Convert method to start conversion
excelConversion.Convert("C:\MyOutput.pdf")

End Sub

End Module

using ceTe.DynamicPDF.Conversion;

class MyClass
{
static void Main()
{
//Create new instance of conversionOptions.
ExcelConversionOptions conversionOptions = new ExcelConversionOptions(ExcelPageSize.A4,10,10);
FitExcelPageScaling fitExcelPageScaling = new FitExcelPageScaling();
fitExcelPageScaling.PagesByTall=1;
ExcelPageScaling excelPageScaling = new ExcelPageScaling();
excelPageScaling.FitExcelPageScaling = fitExcelPageScaling;
conversionOptions.PageScaling = excelPageScaling;

// Create new instance of Converter by providing suitable parameters.
ExcelConverter excelConverter = new ExcelConverter(@"C:\MyDocument.xlsx",conversionOptions);

//Call Convert method to start conversion
excelConverter.Convert(@"C:\MyOutput.pdf");
}
}

PagesByWide​

Returns or sets the number of pages wide the worksheet will be scaled to when it's printed. Applies only to worksheets.

public int PagesByWide { get; set; }
Public Property PagesByWide As Int32

Property Value​

Int32

Licensing Info​

This property is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:

Examples​

Example shows how to use PagesByWide property.

Imports ceTe.DynamicPDF.Conversion

Module Module1

Sub Main()

' Create new instance of conversionOptions.
Dim conversionOptions As ExcelConversionOptions = New ExcelConversionOptions(ExcelPageSize.A4,10,10)
Dim fitExcelPageScaling As fitExcelPageScaling = New FitExcelPageScaling()
fitExcelPageScaling.PagesByWide=1
Dim excelPageScaling As ExcelPageScaling = New ExcelPageScaling()
excelPageScaling.FitExcelPageScaling = fitExcelPageScaling
conversionOptions.PageScaling = excelPageScaling
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx",conversionOptions)

' Call Convert method to start conversion
excelConversion.Convert("C:\MyOutput.pdf")

End Sub

End Module

using ceTe.DynamicPDF.Conversion;

class MyClass
{
static void Main()
{
//Create new instance of conversionOptions.
ExcelConversionOptions conversionOptions = new ExcelConversionOptions(ExcelPageSize.A4,10,10);
FitExcelPageScaling fitExcelPageScaling = new FitExcelPageScaling();
fitExcelPageScaling.PagesByWide=1;
ExcelPageScaling excelPageScaling = new ExcelPageScaling();
excelPageScaling.FitExcelPageScaling = fitExcelPageScaling;
conversionOptions.PageScaling = excelPageScaling;

// Create new instance of Converter by providing suitable parameters.
ExcelConverter excelConverter = new ExcelConverter(@"C:\MyDocument.xlsx",conversionOptions);

//Call Convert method to start conversion
excelConverter.Convert(@"C:\MyOutput.pdf");
}
}

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​

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 Converter feature. One of the following is required for non-evaluation usage:

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 Converter feature. One of the following is required for non-evaluation usage:

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 Converter feature. One of the following is required for non-evaluation usage:

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 Converter feature. One of the following is required for non-evaluation usage:

See Also​

ceTe.DynamicPDF.Conversion