PageScalingFactor Property

PrintTicket.PageScalingFactor Property

 

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

Namespace:   System.Printing
Assembly:  ReachFramework (in ReachFramework.dll)

member PageScalingFactor : Nullable<int> with get, set

Property Value

Type: System.Nullable<Int32>

An Int32 value that represents a percentage.

Exception Condition
ArgumentOutOfRangeException

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

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

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft