Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ElevenSGML Functions (continued)

11.13 Page Break Object

11.13.1 General

Page breaks in HTML are normally set by using the CSS page-break-before and page-break-after properties. For HTML formatted with Novaworks tools, page fields are employed which structure the information around the actual break to allow the user to control the content of the page header and footers.

The Page Break Object allows a source object to be mapped and processed. Page breaks do not have to be in field format but the capabilities for editing and display increase dramatically when using fields.

To use the function, the object must be mapped and a Page Break Object handle will be returned.

In addition, page break field code can be created.

11.13.2 The Page-Break Field

Page Break Fields are using with in Novaworks Page View editors to provide control of HTML pages in a manner similar to a word processor. They can be managing in groups, renumbered, sectioned, etc.

When creating or accessing the code for page break fields, the area is broken into three main parts: the container, the footer and the header. The contain has the field control code, meta data and divisions to group the sections. The header and footer consist either of free flowing HTML or a table of one to three columns (usually one row). If the field is a combination header/footer then the actual CSS page break code is place are the start of the second division.

In the page editor, the code appears as follows (in a browser the shading and marks do not appear):

A sample container is as follows:

<!-- Field: Page -->
<DIV STYLE="margin-top: 12pt; margin-bottom: 6pt">footer</DIV>
<DIV STYLE="page-break-before: always; margin-top: 6pt; margin-bottom: 12pt">header</DIV>
<!-- Field: /Page --> 

Notice this container does not have the tables for the header and footer.

The table below outlines key names for the field data in addition for position information.

11.13.3 Property Key Names

A number of function share property key names either as the primary name in a list or as column names in a table. Numeric data is in the form of a decimal or hexadecimal string as inficated. The items are as follows:

  Key Name   Description  
           
  Basic Information:      
    s_x   Zero-based start X position as decimal string.  
    s_y   Zero-based start Y position as decimal string.  
    e_x   Zero-based end X position as decimal string.  
    e_y   Zero-based end Y position as decimal string.  
    p_no   Page number as decimal string, if provided.  
    flags  

Hexadecimal string representing flags (mostly as alterations and updates). Bitwise flags:

HPB_ENTRY_ALTERED      0x0001 Page Has Been Edited

HPB_ENTRY_DELETED      0x0002 Page Has Been Deleted

HPB_ENTRY_UPDATE_MASK  0x0003 Update Mask 

 
    type  

Type of page break:

Types

HPB_TYPE_MASK          0x0000000F  Break Type Mask

HPB_TYPE_UNKNOWN       0x00000000  Unknown Break Type

HPB_TYPE_FIELD         0x00000001  Field Style Page Break

HPB_TYPE_FIELD_CAPTION 0x00000002  Field Style Page Caption

HPB_TYPE_EDGARIZER     0x00000003  EDGARizer Style

HPB_TYPE_GENERAL       0x00000004  Unknown Break Style

CSS

HPB_TYPE_BEFORE        0x00001000  Break Before Block

HPB_TYPE_AFTER         0x00002000  Break After Block

HPB_TYPE_INSIDE        0x00004000  Break Inside Block

Page Information

HPB_TYPE_SECTION_START 0x00010000  Starts a Section

HPB_TYPE_SOFT_BREAK    0x00020000  Soft Page Break

HPB_TYPE_SOFT_BLOCK    0x00040000  Breaks a Block 

 
  Break Data (field only):      
    bd_error  

A set of flags containing any parse errors while loading the break data. The value is in hexadecimal form as a formatted error code. The lower word values are as follows:

01 – Error loading element

02 – Error translating page field code

03 – Incorrect field type

04 – Failure to read first element of footer

05 – Expected division tag not found in footer

06 – Could not locate free format footer closing element

07 – Failure to get first structure element in footer

08 – Could not locate table cell in footer

09 – Error reading footer cell

0A – Error reading next footer element

0B – Failure to read first element of header

0C – Expected division tag not found in header

0D – Could not locate free format header closing element

0E – Failure to get first structure element in header

0F – Could not locate table cell in header

10 – Error reading header cell

11 – Error reading next header element

 
    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_AUTO       -1   Auto (Based on A/B/C Cells)

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

HPB_FORMAT_MIXED       5   Mixed (dialog only) 

 
    f_f   A string containing the free format data.  
    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_f   A string containing the free format data.  
    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.  

 

11.13.4 Functions