Base document
Pointbase at a .dotx or .docx made in Word:
- Styles, including the defaults (font, size, spacing) and Word’s built-in styles as the company changed them
- Theme (colors and fonts that Word’s theme choices refer to)
- Font table and embedded fonts
- List numbering definitions
base takes a path, URL or bytes, and goes through the same loadFile as images. It cannot be combined with the styles prop of Document.
Headings and built-in styles
H1 to H6, the table of contents, links and captions use Word’s built-in styles. With a base, they use the base’s version of each style, found by Word’s internal name (“heading 1”). This works whatever language Word was in when the template was made: a Portuguese template calls it Título 1 and the document still uses it.
Built-in styles the base lacks are added with the library’s defaults.
Styles by name
styleName applies a style from the base:
className still applies on top of the style, like inline formatting in Word.
A table style’s header row formatting applies to tables with a Thead. Word gives paragraph styles priority over table styles, so if the base’s Normal style sets a text color, a table style’s text color does not show; set the color in the table style’s paragraph style or leave Normal without one.
Embedded fonts
regular, bold, italic, boldItalic. They are stored in the document, obfuscated as Word does, and Word uses them on machines without the font. name must be the family name the text uses.
- TrueType (
.ttf) and OpenType (.otf) files are accepted. Prefer.ttf: Word may not use embedded fonts with PostScript (CFF) outlines - Fonts whose license restricts embedding are refused with an error
- Each file adds its size to the document; embed only the variants in use
Language
lang.