| Visual Basic (Declaration) | |
|---|---|
Public Property SmartPrintRules As SmartPrintRulesCollection | |
| Visual Basic (Usage) | Copy Code |
|---|---|
| |
| C# | |
|---|---|
public SmartPrintRulesCollection SmartPrintRules {get; set;} | |
Return Value
SmartPrintRulesCollection object containing the collection of optimum printing rulesThis example shows how to define the settings for optimizing the printing.
| C# | Copy Code |
|---|---|
// Typically you would use one type of optimization; they are all shown here for illustration only | |
| Visual Basic | Copy Code |
|---|---|
' Typically you would use one type of optimization; they are all shown here for illustration only | |
The SmartPrintRulesCollection provides a set of rules that contains the following objects:
- a BestFitColumnRule object
- a LandscapeRule object
- a ScaleRule object and
- a SmartPrintRule object
Together, these rules dictate how Spread tries to fit the sheet onto printed pages. You can change the properties for these objects by setting the objects' properties.
By default, these optimum printing rules provide the following behavior:
- If the information can be printed without the sheet making any changes, the sheet prints in portrait mode.
- If the sheet is wider than a portrait page, the sheet prints in landscape mode.
- If the information does not fit in landscape mode, but will fit in landscape mode if the sheet is reduced up to 60% of its original size, the sheet is scaled to fit within the page.
- If the information cannot be scaled to fit, the sheet tries to reduce column widths to accommodate the widest string within each column.
- If all attempts to make the sheet print within a page fail, printing resumes normally in the current printer orientation with no reductions.
For more information about optimum printing, refer to Optimizing Printing.