API reference
The public API for Ream.
The package reads Word, Excel, PowerPoint and PDF — including the legacy
.doc / .xls / .ppt — and converts any of them to PDF, SVG, HTML, DOCX or
XLSX, implemented from the ECMA-376 and ISO 32000 specifications without
wrapping LibreOffice, headless Office, or any commercial SDK.
Typical use:
import { Ream } from 'reamkit';const doc = Ream.parse(bytes); // format sniffedconst pdf = await doc.convert('pdf'); // one parse, any targetAdvanced consumers can build custom pipelines from the reader/writer
interfaces, drive the layout engine directly via renderStyledPdf,
supply a hyphenator, or import the typed document model from the
reamkit/document-model subpath.
Classes
Section titled “Classes”Interfaces
Section titled “Interfaces”- BorderItem
- Converter
- ConvertOptions
- ConvertResult
- CreateConverterOptions
- DocumentInfo
- DocumentReader
- DocumentWriter
- FaceFamily
- FaceGlyph
- FaceOutlines
- FetchFontSetOptions
- FillItem
- FlowDoc
- FontBytesByVariant
- FontProvider
- FontRequest
- Hyphenator
- HyphenatorOptions
- ImageItem
- LaidOutDocument
- LaidOutPage
- Loss
- MarkdownWriteOptions
- NativeBag
- PageItemBase
- ParsedTtf
- PdfEncryptOptions
- PdfPermissions
- ReadOptions
- ReadResult
- ReamConvertOptions
- ReamParseOptions
- ShapeItem
- SignatureOptions
- SignaturePlaceholder
- SignerCredentials
- StyledRenderOptions
- SvgWriteOptions
- TextLineItem
- WriteOptions
- WriteResult
Type Aliases
Section titled “Type Aliases”- FamilyKey
- Feature
- FetchLike
- FontAnswer
- FontVariant
- GlyphSeg
- KnownFeature
- LossReport
- LossSeverity
- PageItem
- Pt
- ReamTarget
- ResourceId
- StreamFilter
- StreamFilters
- SupportedLanguage
Variables
Section titled “Variables”Functions
Section titled “Functions”- callerFontProvider
- chainProviders
- createConverter
- createHyphenator
- createLanguageHyphenator
- eighthPtToPt
- embeddedDocFontProvider
- emuToPt
- fetchFontSet
- formatLoss
- getHyphenator
- halfPtToPt
- inchToPt
- isEmbeddingRestricted
- isEncryptedPackage
- layoutStyledDocument
- localFontProvider
- mmToPt
- parseTtf
- pt
- pxToPt
- readDocx
- readOs2FsType
- readXlsx
- remoteFontProvider
- renderStyledPdf
- resolveFamilyKey
- signPdf
- splitPatternBundle
- subsetTtf
- twipsToPt
- writeDocx
- writeHtml
- writeMarkdown
- writeSvg