Skip to main content

PercentagePageScaling

Version: 3.0

cete.dynamicpdf.printing.percentagepagescaling

PercentagePageScaling​

  • Namespace: ceTe.DynamicPDF.Printing
  • Assemblies: ceTe.DynamicPDF.Printing.40.x64.dll, ceTe.DynamicPDF.Printing.40.x86.dll

Represents the class that allows to specify page scaling size in percentage.

public class PercentagePageScaling : AutoPageScaling
Public Class PercentagePageScaling
Inherits AutoPageScaling

Inheritance: Object → PageScaling → AutoPageScaling → PercentagePageScaling

Licensing​

This class is a DynamicPDF PrintManager feature. The following license is required for non-evaluation usage:

  • DynamicPDF PrintManager for .NET

Examples​

The following examples creates a print job, sets the page scaling and prints the job.

Imports System
Imports ceTe.DynamicPDF.Printing

Module MyModule

Sub Main()

' Create a print job
Dim MyPrintJob As PrintJob = New PrintJob("PrinterName", "C:\MyDocument.pdf")
'Create a PercentagePageScaling object with a scaling factor of 0.1 to specify 10% scaling.
Dim MyPercentagePageScaling As PercentagePageScaling = New PercentagePageScaling(0.1F)

' Set the scaling
MyPrintJob.PrintOptions.Scaling = MyPercentagePageScaling

' Print the job
MyPrintJob.Print()
End Sub
End Module
using System;
using ceTe.DynamicPDF.Printing;

class MyClass
{
static void Main()
{
// Create a print job
PrintJob printJob = new PrintJob("PrinterName", @"C:\MyDocument.pdf");

// Create a PercentagePageScaling object with a scaling factor of 0.1 to specify 10% scaling.
PercentagePageScaling percentagePageScaling = new PercentagePageScaling(0.1f);

// Set the scaling
printJob.PrintOptions.Scaling = percentagePageScaling;

// Print the job
printJob.Print();
}
}

Constructors​

PercentagePageScaling(Single)​

Initializes a new instance of the PercentagePageScaling class.

public PercentagePageScaling(float scale)
Public Sub New (scale As Single)

Parameters​

A value between 0 to 1 to specify page scaling factor.

PercentagePageScaling(Single, Single)​

Initializes a new instance of the PercentagePageScaling class.

public PercentagePageScaling(float scaleX, float scaleY)
Public Sub New (scaleX As Single, scaleY As Single)

Parameters​

A value between 0 to 1 to specify horizontal page scaling factor.

A value between 0 to 1 to specify vertical page scaling factor.

Properties​

AutoExpand​

Gets or sets a value indicating if the page scaling size can be expanded. (Inherited from AutoPageScaling)

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

Property Value​

Boolean

AutoShrink​

Gets or sets a value indicating if the page scaling size can be shrunk. (Inherited from AutoPageScaling)

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

Property Value​

Boolean

ScaleTo​

Gets or sets a value indicating the boundaries on the page to use for the scaling. (Inherited from AutoPageScaling)

public ScaleTo ScaleTo { get; set; }
Public Property ScaleTo As ScaleTo

Property Value​

ScaleTo

ScaleX​

Gets the horizontal page scaling in percentage.

public float ScaleX { get; set; }
Public Property ScaleX As Single

Property Value​

Single

ScaleY​

Gets the vertical page scaling in percentage.

public float ScaleY { get; set; }
Public Property ScaleY As Single

Property Value​

Single

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.Printing