> ## Documentation Index
> Fetch the complete documentation index at: https://calcs.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Print/Export Rules

> Complete rules and formatting for print and export modes in Calcs.com templates

## Current Export Rules

### Header & Footer

#### Header Format

**Small font at very top of header:**

* *Left aligned:* template name, version number, and preset
* *Right aligned:* "Created with [calcs.com](http://calcs.com)"

**Main header (three columns):**

* *Left column:* Company logo
* *Centre column:* Client, Author, Project, and References (each on a new row)
* *Right column:* Date, Job #, and Subject (each on a new row)

<Note>
  The centre and right columns have table cells outlined in grey.
</Note>

#### Footer Format

**Very bottom of footer:**

* *Right aligned:* page number

## Print Modes & Widgets Shown

These rules are defined in the file `filterSheetWidgets.tsx`. There are currently 3 print modes, each with specific rules and logic.

<Warning>
  `"remote"` widgets and widgets with `"hidden": true` are never exported in any mode.
</Warning>

### Detail Mode

* **Format:** Single column, with references for equation widgets
* **Widgets printed:** All widgets
* **Order printed:** In order of JSON file

### Standard Mode

*Internally also known as "Summary"*

* **Format:** Single column
* **Widgets printed:**
  * All input-related widgets (`"input"`, `"lookup"`, and `"comment"`)
  * All `"image"` widgets
  * All `"diagram"` widgets
  * `"table"` widgets where `"showInSummary": true`
  * `"computed"` widgets where either:
    * `"showInSummary": true`, or
    * `len("checks") > 0`
  * Any `"section"` widgets containing at least one other printable widget

#### Widgets NOT Printed in Standard Mode

* `"computed"` widgets where `"showInSummary": false` and `len("checks") == 0`

* `"table"` widgets where `"showInSummary": false`

* **Order printed:** In order of JSON file

### Summary Mode

*Internally also known as "Super-summary"*

* **Format:**
  * Two columns
  * Widget label, symbol, value, and unit only (no references)
* **Widgets printed:** Any widget with `"showInSuperSummary": true`

#### Legacy Widgets Logic

*Applied if no widget has `"showInSuperSummary": true`*

* **The sheet name**
  * On line 1 of the left column (under heading "Subject:")
  * Note: This repeats what's already in the page header

* **The widget with `"referenceId": "members"`**
  * Member name on line 2 and length on line 3 of the left column (under heading "Member:")
  * Uses appropriate legacy logic similar to member selector for pulling the same information

* **All `"computed"` widgets in the first section of the JSON file** where either:
  * `"showInSummary": true`, or
  * `len("checks") > 0`
  * Split between the middle and right columns

* **All diagram widgets in the first section of the JSON file**

* **Order printed:** In order of JSON file (by page and then by column)

## Implementation Notes

The print mode logic ensures consistent formatting across all Calcs.com templates while providing different levels of detail based on user needs. The filtering system allows for flexible control over what content appears in each export mode.
