The kind of every error this deck raises, except a reached cap ("limit")
MAX_NESTING
100
Nesting depth (tables, lists, RTF groups) past which a reader stops
MAX_INFLATED
268435456
Bytes a DOCX or ODT container may declare in total
MAX_ENTRIES
4096
Members a DOCX or ODT container may hold
MAX_BLOCKS
200000
Blocks one document may hold: body, cells, notes, comments, header and footer together
MAX_SPAN
1000
Columns or rows one table cell may span
MAX_CELLS
200000
Table cells one document may hold, all tables together, a spanned cell counted as the slots it covers; a reader counts repeated and spanned rows before building them
MAX_INLINES
100000
Inlines one paragraph may hold
MAX_TEXT
67108864
Characters of text one document may hold, counted as a reader expands it (repeated spaces, tabs, field instructions included)
Every reader also caps an XML part at 400 levels of nesting and about 2 million nodes (core xml), and readRtf at 4 Mi tokens and 256 MiB of input.
Read an RTF file: roles from the stylesheet, lists, tables with spans and nesting, links, notes, comments, PNG and JPEG pictures; code pages 1250 to 1258 and Mac Roman
writeRtf(d)
bytes
The document as 7-bit RTF 1.9.1; the same document gives the same bytes
A paragraph with a role ("title", "quote", "code", ...)
heading(level, inlines)
Block
A heading, level 1 to 6
listItem(listId, level, inlines)
Block
An item of list listId (1-based) at level 0 to 8
pageBreak()
Block
A page break
table(rows, headerRows)
Block
A table; headerRows is 0 to the number of rows
textTable(cells, headerRows)
Block
A table of plain-text cells
cell(blocks)
Cell
A cell spanning one row and one column
text(s)
Inline
Unformatted text
styled(s, style)
Inline
Formatted text
bold(s)
Inline
Bold text
italic(s)
Inline
Italic text
link(s, target)
Inline
Hyperlinked text; #name for a bookmark
lineBreak()
Inline
A line break inside a paragraph
tab()
Inline
A tab
image(media, alt)
Inline
A picture added with addMedia
noteRef(note)
Inline
A footnote reference, by index into notes
plain()
RunStyle
Formatting with nothing set
bullets()
ListDef
A bulleted list
numbering(format, start)
ListDef
A numbered list counting from start (1 or more)
addList(d, numbered)
Document
Add a list; its id is the new length of lists
addNote(d, blocks)
Document
Add a footnote; its index is the old length of notes
addMedia(d, name, data, width, height)
Document
Add a PNG, JPEG or GIF; 0 for a size takes the picture's own
emptyMeta()
Meta
Properties all ""
a4()
Page
A4, 2.5 cm margins
letter()
Page
US Letter, 1 inch margins
plainText(d)
string
The document's text, a line per paragraph or table row
checkDocument(d)
-
Throw "docs" (or "limit" past a cap) for anything a writer cannot hold; every reader and writer calls it, so a document that passes converts to any format