Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter EighteenDataView Integration (continued)

on_print

Overview

The on_print event is called when the print function wants the workbook rendered. The workbook must be render as HTML.

Syntax/Parameters

Syntax

string = on_print ( string filename ) { ... }

Parameters

filename

The filename to write the contents of the view. This is an intermediate filename.

Return Value

The function is expected to complete the process. An error code can be returned but is presently ignored.

Remarks

The script should create an HTML image from the data to be printed and then save that data to the supplied filename. In order to enable printing, the menu state must be set to allow for print.

If this hook is present in the file, the Print and Print PDF functions are automatically enabled on the ribbon.

Related Events and Functions

DataViewGetObject — Returns a Data View handle (for an associated sheet) for the specified view by window handle. Also locks for paint.

on_launch — Called when the application wants HTML to print.

on_menu_init— Called anytime the ribbon or a menu must be prepared for display or updated.