% PStill can 'draw' graphics on the output pages, script controlled % You can activate a script in the GUI under Options->N-UP Output Options % Or use -m pagecontrol=scriptname.sl on the command line % % ps_do_showpage(int pagenum) is called for each processed page % The variable "pagenum" is set to the current page number during processing % This scripts adds 'line numbers' at the left side of the page, configure it here: % All values in pts (1/72 inch) variable X_POS = 10.0; % Position of line numbers, 0 is left edge of page incrementing to the right variable Y_POS = 700.0; % Start of lines, 0 is lower edge of page incrementing to the top variable Y_INC = 25.0; % Increments for Y, repeatedly subtracted until 0 is reached define ps_do_showpage(pagenum) { variable y; variable linecnt; % startGFX must be called before the first commands are used startGFX(); % set the current color in RGB (values 0.0. to 1.0) setRGBColor (0.0, 0.0, 0.0); % Black % setFont() sets the font, encoding and X/Y-Sizes for the text % font is the 'true' font name as shown in the Fontmanager of PStill % encoding can be 0 for font default or 1 for ISOLatin1 % X-Size in pts, likewise Y-Size % Any font installed with PStill can be used setFont("Courier", 0, 8, 8); % The drawText() call "prints" text on the current page % using sprintf(fmt,..., num_of_params); % you can also use define dynamic texts % parameters are % text to be printed % x-position in pts (lower left == zero) % y-position in pts % rotation in degree linecnt = 1; for (y=Y_POS;y>0;) { drawText( sprintf("%d",linecnt,1), X_POS, y, 0); y = y - Y_INC; linecnt = linecnt + 1; } % % The next call ends the page drawing % it MUST be called before exiting this function endGFX(); }