Liquid UI - WS Reference Library

6.3.2 Wsprint JavaScript Functions

There are also three Javascript functions contained in the wsprint.js file. These are APIs used by print functions such as '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);


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!');


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!');