Bewerken

Delen via


PrintTicket.PageScalingFactor Property

Definition

Gets or sets the percentage by which the printer enlarges or reduces the print image on a page.

public:
 property Nullable<int> PageScalingFactor { Nullable<int> get(); void set(Nullable<int> value); };
public int? PageScalingFactor { get; set; }
member this.PageScalingFactor : Nullable<int> with get, set
Public Property PageScalingFactor As Nullable(Of Integer)

Property Value

An Int32 value that represents a percentage.

Exceptions

Calling code has attempted to set the property to a value that is less than 1.

Remarks

The printer can have maximum and minimum limits for scaling. You can test for scale limits by using PageScalingFactorRange.

A null value for this property means that this feature setting is not specified. Also, when the value is null, the XML versions of the PrintTicket (see SaveTo and GetXmlStream) will not contain any markup for this feature.

This PageScalingFactor property generally represents the Scale ScoredProperty of the Print Schema's PageScaling keyword. But there are some complexities as follows.

When reading the PageScalingFactor property, the property behaves as follows.

  • If the PrintTicket XML document has the PageScaling feature set to the CustomSquare option, and the CustomSquare option's Scale value is positive value, then that is the value that is returned.

  • If the PrintTicket XML document has the PageScaling feature set to the Custom option, and the Custom option's ScaleWidth value is positive value, then that is the value that is returned.

  • In all other cases, null is returned.

When setting the PageScalingFactor property, the property behaves as follows.

  • If it's set to null, then the PageScaling markup is removed from the PrintTicket XML document.

  • Otherwise, the PageScaling feature in the PrintTicket XML document is set to CustomSquare and the CustomSquare option's Scale value is set to the passed value. (See Exceptions for what happens if the property is set to a value less than 1.)

Applies to