newObjects Active Label Page object

Obtained from the VisiLabel object:
oPage = VisiLabel.Page;
The Page object exposes the page format properties. Through its properties the application can set/get the page size, margins, the spacing between the labels and other parameters. The size of the page determines the number of the labels that can be put on it. These properties have effect only for printing operations. Depending on the printer and its driver you may need to use them to adjust the actual paper parameters or use the defaults and rely on the printer's settings. Note that there are many different label paper formats and the printer you use may not support enough features to allow you define each label as a page. In such cases this object is extremely useful as it allows the application to deal with this and print the labels exactly where they must be. The size and the other metrics are specified in the units specified by the Misc.Units property. By default 1 = 1/100 millimeters. 

The properties responsible for the page size and labels arrangement on it are shown on the figure:

Text command:

The text commands are used to represent objects and their settings in the saved label data. When the label is saved or uploaded (see How to Download and Upload) text commands are generated and packed in the specified format (see Misc.SaveFormat). The representation of the entire label with its elements can be also obtained programmatically through VisiLabel.TextCommands and VisiLabel.ObjectParams. The commands have simple syntax and can be generated from the application (just like a HTML output) where appropriate allowing the developer implement different tasks in any suitable way. The label can be instantiated from set of text commands (see the list of the different options to do this). The text commands can be feed into the control programmatically (see VisiLabel.TextCommands) or a download can be invoked (see VisiLabel.Src and VisiLabel.MergeSrc).

The Page object is represented by the PAGE text command. 

Members reference:

Properties
Width Long integer. Get/Set the width and the height of the page in the current measurement units (see Misc.Units). The default value is 0. If these properties are 0-s the control will use the paper size reported by the printer. Therefore in the most cases in which you work with standard paper you do not need to specify its size. By "standard" we mean a paper size supported by the printer driver - i.e. a paper size that can be set in the printer's property pages.
The label papers are available in various formats, there are some de facto standards, but they are too many and it is possible that you may need to work with paper not explicitly supported by the drivers of your printer. In such case you need to determine the paper size and specify it in these properties (the actual implementation will differ depending on the application design - for instance sometimes you may want to hard code the paper size and sometimes you may want to give the user the opportunity to specify it).
Example:
VisiLabel.Page.Width = 21000; // Set the width to 21 cm
VisiLabel.Page.Height = 29700; // Set the width to 29.7 cm


A note about some printers: It is rare, but you may stumble across a minor issue with some printers (actually their drivers) which is easy to correct. The 0 point (the paper start) may be reported a bit incorrectly by the printer thus putting the beginning of the page before or after the actual physical paper border. When you make a printing test for a newly installed printer keep this in mind and remember the specified margins (pay special attention to the TopMargin). Then measure the actual margins on the print out to see if they match the specified values. This is not issue of the control but of the printer drivers it will show up with all the applications on your machine, but may remain unnoticed until more precision is required (as is the case with labels).
Height
LeftMargin Long integer. Get/Set the page margins for each side of the paper in the current measurement units (see Misc.Units). The default values are 1000 (1cm). These values most often require special attention because even with the standard label papers you may stumble across a minor differences (even 1-2 millimeters can be important for papers with very small labels, we recommend working with paper from the same vendor if you print huge amount of labels) . To save time you can prepare template labels for the most frequently used paper formats in your organization.
TopMargin
RightMargin
BottomMargin
LabelSpacingHorz Long integer. Set/Get the spacing between the labels on the page in the current measurement units (see Misc.Units). These properties specify the horizontal (LabelSpacingHorz) and the vertical (LabelSpacingVert) spacing between the labels. The labels are put on the page from left to right and from the top to the bottom (see the figure in the beginning of the page). By specifying the correct margins and spacing the Active Label will fit the printed sets of labels onto the labels on the paper.
LabelSpacingVert
VisiLabel Returns the VisiLabel object to which the Page object belongs.
Methods
ShowProperties Displays the property sheets for the Page object giving the user the opportunity to change the page settings.
Syntax:

VisiLabel.Page.ShowProperties();

Remarks: 

If the printer supports paper formats that would accommodate one line of labels (in case of continuous paper source) or exact number of label lines (in case of sheet paper) you can use 0-s for the paper Width and Height. This will instruct the VisiLabel to place the labels automatically. However you will need to pay attention to the label spacing and the margins in order to fit the labels. If the printer cannot be configured with the correct paper format (some printer drivers do not support custom paper size) you will need to specify the Width and Height and instruct the Active Label to configure the printer on a lower level.

Will this pose a problem with certain printers? In almost all the cases the answer is no, still there is a slight probability that some printer features may be lost that way. For example there are printers with paper cutters, although most of these printers would cut in the end of the page some may be constructively unable to cut the paper at random locations or their drivers may be incomplete and thus unable to support custom paper sources. In such case you have no choice but to use different paper or turn off the printer feature that is incompatible with the paper source you want to use. Of course you can contact the printer manufacturer for support, but most often such a problem is caused by hardware limitations and cannot be solved from the PC side.

 

 

 

newObjects Copyright 2001-2006 newObjects [ ]