Automatic Adjustments to Page Setup Values |
The values of some properties of the PageSetup object may be changed automatically if they conflict with other properties of the object. If the total width of the items on a page, combined with the size of horizontal gaps and left/right page margins are not equal to the width of the paper, then BarTender will change one or more values. A similar point applies if the total height of items, combined with the size of the vertical gaps, top margin, and bottom margin do not match the paper height.
BarTender uses the following logic in making adjustments:
BarTender will first attempt to eliminate the incompatible values by adjusting the PageSetup.LabelWidth and/or PageSetup.LabelHeight properties. Adjustment of these properties is blocked when the PageSetup.LabelSizeManual property is set to true.
If the problem cannot be fixed by adjustments to only the size of the template(or if such adjustments are blocked), then BarTender will attempt to fix the problem by adjusting the PageSetup.LabelGapHorizontal and/or PageSetup.LabelGapVertical properties. Adjustment of these properties is blocked when the PageSetup.LabelGapManual property is set to true.
If adjustments to the gaps and template size are both blocked, BarTender will attempt to fix the problem by adjusting the PageSetup.MarginBottom and/or PageSetup.MarginRight properties. Adjustment of these properties is blocked if either the PageSetup.LabelGapManual or PageSetup.LabelSizeManual properties are set to false.
If the problem cannot be resolved with any of the preceding adjustments, BarTender will set the PageSetup.Valid property to false and processing of your program will continue. If the program uses the Format.PrintOut method when PageSetup.Valid is false, then you will receive error messages and labels will not print.
BarTender will never automatically change the following properties: