Constructors
Barcode([System.String],[System.String]) Summary: Constructor of the barcode object. It initializes the structure and loads the configuration from the database, either from the current title or, if the system is configured to keep the barcode information against zone/section/edition number, from the relevant item of the current page (section, zone, etc.). Parameters: •BCW: String indicating the width of the barcode, by default 40mm. The string will be converted internally into millipoints. •BCH: String indicating the height of the barcode, by default 25mm. The string will be converted internally into millipoints. |
Properties
FolderId Summary: Get/Set the id of the Folder where the barcode image is saved Remarks: No check is done if value is a valid folder id and the user has permissions on it. It should be done. |
Rotation Summary: Get/Set operation to indicate whether the barcode is landscape or rotated 90 degrees Remarks: TO DO: it should be possible to indicate how many degrees the barcode is rotated as this is supported by the Barcode DLL and customers may want the barcode “mirrored” when portrait. |
Width Summary: Get/Set operation to set the width of the barcode after creation. |
Height Summary: Get/Set operation to set the height of the barcode after creation. |
ISSN Summary: Get/Set for the ISSN value, including validity of the ISSN as a numeric string of 7 digits. Remarks: If the parameter is invalid, in the Set operation, a message is displayed with some information. |
Frequency Summary: Get/Set for the publication frequency Remarks: If we change the frequency, we invalidate the Price Change value, as this has different lengths based on the publication’s frequency. It is necessary to call this method BEFORE the price change’s one, not the other way around! |
PageNo Summary: Get/Set for the page number, if the script wants to change at real time which page the barcode should be on. Remarks: The object indicates the last page of an edition with the value -1, or any page in the edition with the value 0. Value 1 indicates the front page. These constants are defined in the enum BarcodePage |
PriceChange Summary: Get/Set property to set the “Price Change” of the barcode from script. Either returns one of the string indicating the “price change” (sequence variant), or sets the new value. Remarks: The set method has to be called before the Generate if the script wants to change the price of a specific publication from the preset one. If the length of value is not compatible with the frequency of the publication, a message is emitted and no changes are done to the object. |
Methods
Generate AS Boolean Summary: Main function to create the barcode, in memory, from the parameters set in the object. On return, the Barcode Object is fully initialized. |
SrvSaveFile(System.String,[System.Boolean]) Summary: Calls the GN4 workflow to create the barcode file on the server and to save it in the sPath folder. This is usually a monitored folder that logs images to a specific folder. Parameters: •sPath: The folder where to create the barcode. It is a parameter of the workflow •bDoTif: If True, the barcode will be saved as a TIFF file. Otherwise, it will be a JPEG |
GetBarcodeId AS Integer Summary: Returns the Id of the barcode image, if the image is in the database. Remarks: Search for image with a specific name in a specific basket... |
Place(System.String,System.String,[System.Boolean],[System.String]) AS Boolean Summary: Places the image for the Barcode object on page, at the requested position and with the relevant text around it. If sTitle is not Nothing, creates a text box over the barcode with that string. If the bDoTitle is true and sTitle is Nothing, will print the ISSN of the publication. Parameters: •BCX: X position of the barcode image •BCY: Y position of the barcode image •bDoTitle: True: generate text box above the barcode •sTitle: GNML text to print over the barcode image. If missing and bDoTitle is true, will print the ISSN Remarks: The function will check if the barcode image is already present in the database, with the computed name and in the specific folder. If it isn't, it will create a dummy picture and place it on page. The picture and the text will be grouped together and may be rotated if so required. |