There are also three Javascript functions contained in the wsprint.js file. These are APIs used by print functions such as 'tablePrint'.
tablePrint
The tablePrint API is used to print text in a table format. To use this function, users should first specify the contents of one row as an array, then create an array of rows that need to be printed. Once this array is created, it is possible to call the tablePrint( ) function on that array. The syntax is as follows:
var row1=["Row1 Col1", "Row1 Col2", ...];
var row2=["Row1 Col1", "Row2 Col2", ...];
var table=[row1, row2, ...] a.tablePrint(1);
printCenterAlign
This is a function to print text that is aligned with the center. Text to be printed is passed in as an argument. the syntax is as follows:
a.printCenterAlign('Center-aligned text to be printed!');
printRightAlign
This works exactly the same way as the printCenterAlign function above except it will align text to the right. The syntax is as follows:
a.printRightAlign('Right-aligned text to be printed!');