Skip to main content

ZoomExcelPageScaling

Version: 2.0

cete.dynamicpdf.conversion.zoomexcelpagescaling

ZoomExcelPageScaling​

  • Namespace: ceTe.DynamicPDF.Conversion
  • Assemblies: DynamicPDF.Converter.NETFramework40.dll, DynamicPDF.Converter.NETStandard20.dll

Represents the ZoomExcelPageScaling for the ExcelPageScaling.

public class ZoomExcelPageScaling : ISerializable
Public Class ZoomExcelPageScaling
Implements ISerializable

Inheritance: Object → ZoomExcelPageScaling

Implements: ISerializable

Remarks​

This class is Serialized

Constructors​

ZoomExcelPageScaling()​

Initializes a new instance of the ZoomExcelPageScaling class.

public ZoomExcelPageScaling()
Public Sub New ()

ZoomExcelPageScaling(Int32)​

Initializes a new instance of the ZoomExcelPageScaling class.

public ZoomExcelPageScaling(int zoomPercentage)
Public Sub New (zoomPercentage As Integer)

Parameters​

ZoomExcelPageScaling(ZoomExcelPageScaling)​

Initializes a new instance of the ZoomExcelPageScaling class.

public ZoomExcelPageScaling(ZoomExcelPageScaling zoomExcelPageScaling)
Public Sub New (zoomExcelPageScaling As ZoomExcelPageScaling)

Parameters​

Properties​

DefaultZoomPercentage​

Returns or sets defaults percentage to Microsoft Excel WorkSheets.

public bool DefaultZoomPercentage { get; set; }
Public Property DefaultZoomPercentage As Boolean

Property Value​

Boolean

Examples​

This example shows how to provide the worksheets default zoom

Module Module1
Sub Main()
Dim xlOptions As New ExcelConversionOptions(ExcelPageSize.Folio, 18.0, 24.0)
xlOptions.PageScaling = New ExcelPageScaling()
xlOptions.PageScaling.ZoomExcelPageScaling = New ZoomExcelPageScaling(75)
xlOptions.PageScaling.ZoomExcelPageScaling.DefaultZoomPercentage = True
Dim xlConverter As New ExcelConverter("C:\\Document.xls")
xlConverter.ConversionOptions = xlOptions
xlConverter.Convert("outputPDF.pdf")
End Sub
End Module
public class Program
{
static void Main()
{
ExcelConversionOptions xlOptions = new ExcelConversionOptions(false);
ExcelConversion xlConverter = new ExcelConverter("SampleTest2.tiff");
xlOptions.PageScaling = new ExcelPageScaling();
xlOptions.PageScaling.ZoomExcelPageScaling = new ZoomExcelPageScaling(75);
xlOptions.PageScaling.ZoomExcelPageScaling.DefaultZoomPercentage = true;
xlConverter.ConversionOptions = xlOptions;
xlConverter.Convert("outputPdf.pdf");
}
}

ZoomPercentage​

Returns or sets a percentage (between 10 and 400 percent) will scale the worksheet for printing. Applies only to worksheets.

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

Property Value​

Int32

Examples​

This example shows how to provide Zoom for the worksheets.

Module Module1
Sub Main()
Dim xlOptions As New ExcelConversionOptions(ExcelPageSize.Folio, 18.0, 24.0)
xlOptions.PageScaling = New ExcelPageScaling()
xlOptions.PageScaling.ZoomExcelPageScaling = New ZoomExcelPageScaling(75)
Dim xlConverter As New ExcelConverter("C:\\Document.xls")
xlConverter.ConversionOptions = xlOptions
xlConverter.Convert("outputPDF.pdf")
End Sub
End Module
public class Program
{
static void Main()
{
ExcelConversionOptions xlOptions = new ExcelConversionOptions(false);
ExcelConversion xlConverter = new ExcelConverter("SampleTest2.tiff");
xlOptions.PageScaling = new ExcelPageScaling()
xlOptions.PageScaling.ZoomExcelPageScaling = new ZoomExcelPageScaling(75)
xlConverter.ConversionOptions = xlOptions;
xlConverter.Convert("outputPdf.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.

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 .

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 .

See Also​

ceTe.DynamicPDF.Conversion