Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ElevenSGML Functions (continued)

HTMLPageBreakCreateCode Function

Overview

The HTMLPageBreakCreateCode function generates a page break field.

Syntax/Parameters

Syntax

string = HTMLPageBreakCreateCode ( handle hSGML, string data[] );

Parameters

hObject

A handle to a Page Break Object.

data

A string array containing parameters to create the page break.

Return Value

A string containing the field code or an empty string on failure. Use the GetLastError and GetLastErrorMessage to retrieve a formatted error code or extended error message, respectively.

Remarks

This function will create code for an Page Break field. The data parameter is a keyed string with the following key names:

  Key Name   Description  
  Break Field Data:      
    first_flag   Non zero if this is the first page. No footer for previous page.  
    last_flag   Non zero if this is the last page. No header for next page.  
    sequence   Sequence number as indicated by the page field. If the page fields require updating, this number may be out of sequence or otherwise incorrect.  
    section   The section name, if the section has a name.  
    sns_flag   Start New Section flag. Non-zero if the header in this group starts a new section.  
    spb_flag   Indicates that this break is marked as a soft break.  
    sbb_flag   Soft Block Break (mid para). The break split a paragraph.  
    page_no   Starting page number. If present, indicates the next page number.  
  Footer Data:      
    f_format  

Format of footer data. This information is not stored by the page field but rather interpreted based on the load of the field. The SDK/decimal values:

HPB_FORMAT_CENTER      0   Center

HPB_FORMAT_LEFT        1   Left

HPB_FORMAT_RIGHT       2   Right

HPB_FORMAT_LEFT_RIGHT  3   Left/Right

HPB_FORMAT_ALL         4   Left/Center/Right

HPB_FORMAT_FREE_FORMAT 5   Unstructured

 
    f_style_default   A simple CSS string or properties for the entire footer.  
    f_style_left   A simple CSS string or properties for the left cell of the footer.  
    f_style_center   A simple CSS string or properties for the center cell of the footer.  
    f_style_right   A simple CSS string or properties for the right cell of the footer.  
    f_f   A string containing the free format data. Using this will automatically set HPB_FORMAT_FREE_FORMAT.  
    f_a   If structured, the first item (left cell).  
    f_b   If structured, the second item (center cell).  
    f_c   If structured, the third item (right cell).  
    f_sb   Space Before Footer as a CSS value.  
  Header Data:      
    h_format   Format of header data. See the footer format above.  
    h_style_default   A simple CSS string or properties for the entire header.  
    h_style_left   A simple CSS string or properties for the left cell of the header.  
    h_style_center   A simple CSS string or properties for the center cell of the header.  
    h_style_right   A simple CSS string or properties for the right cell of the header.  
    h_f   A string containing the free format data. Using this will automatically set HPB_FORMAT_FREE_FORMAT.  
    h_a   If structured, the first item (left cell).  
    h_b   If structured, the second item (center cell).  
    h_c   If structured, the third item (right cell).  
    h_sa   Space After Header as a CSS value.  

 

Not all fields are required. An empty list will generate a field template.

The format fields, f_format and h_format can be specified as shown below or if omitted, the API code will attempt to determine the mode. Note that if a format is specified, the field which would not be applicable are not checked.

 Definition Code  Description 
 HPB_FORMAT_CENTER   0  Center  
 HPB_FORMAT_LEFT   1  Left  
 HPB_FORMAT_RIGHT   2  Right  
 HPB_FORMAT_LEFT_RIGHT   3  Left/Right  
 HPB_FORMAT_ALL   4  Left/Center/Right  
 HPB_FORMAT_FREE_FORMAT   5  Unstructured  

 

Note since that the value to be placed into the data parameter list is a string, the code must be used as the value.

For CSS data, as either the wrapper or left center and right, a limited number of CSS properties are allowed. They are as follows:

  Font-Family Font-Weight Font-Style  
  Font-Size      
  Padding-Top Padding-Right Padding-Bottom  
  Padding-Left      
  Border-Top Border-Right Border-Bottom  
  Border-Left      
  Background-Color      

 

The border parameters must be in the form of: color, width style. For example:

Border-Top: Black 2pt Solid

The case of the text for CSS property names is not relevant. The supplied item must match the format mode. Irrelevant fields are ignored.

Values are loosely checked for syntax. For example a padding value of “3 points” will result in a error (should be “3pt”). On the other hand, a value of “3hz” will not.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic