Skip to content

v8.8.0: 📊 Charts Everywhere, Word & RTF Content, Template Conditions

Latest

Choose a tag to compare

@harshankur harshankur released this 14 Nov 22:42

v8.8.0: 📊 Charts Everywhere, Word & RTF Content, Template Conditions

I am pleased to announce the release of officeParser v8.8.0! Word charts are read, every chart keeps its points, levels, axes and formats and reaches every output, Word and RTF content that used to vanish on the way out (embedded objects, equations, tracked deletions, EMF and WMF pictures) is kept, template conditions take filters and compare numbers on request, and spreadsheets keep their formulas.

Thanks to @setthase, @jayhemnani9910, @L4XB, @brennanbutler01, @gezerui888, @nicolasdev and @ceolinwill, whose pull requests and reports are in this release.


🌟 Key Highlights

1. Charts, read and written whole

  • Word charts are read as chart nodes with their data, as in PowerPoint and Excel (#131).
  • Every point keeps its place: a blank point no longer shifts values onto the wrong category (#136); multi-level categories stay apart (#139); number formats and shown text are kept (#140); every axis is read, with each series' chart type (#143); scatter and bubble charts keep their X values and sizes (#144).
  • Every output writes a chart: Markdown and RTF as their data's table, EPUB as a table, the native PDF engine draws charts in a line of text too. CSV reports the charts it leaves out.

2. Word and RTF content that no longer disappears

Embedded objects (an Excel sheet, an equation) are shown by their preview picture; RTF tracked deletions are left out, RTF equations are read, RTF embedded objects show their last look; EMF and WMF pictures are kept and typed, and the native PDF engine draws the bitmap they hold. A content control's placeholder prompt is no longer read as text (includePlaceholderText writes it).

3. Template conditions

{{ if (answer | lower) == "yes" }}   // filters in conditions
{{ if status <> "paid" }}            // <> reads as !=

numericTextComparison: 'number' compares two number texts as numbers, exactly; by default they compare as text, as before, now with a TEMPLATE_NUMBERS_COMPARED_AS_TEXT warning when ordered. dataNumberSeparators takes a list of ways to read a number and refuses text they read differently.

4. Spreadsheets and slides

XLSX cell formulas are read beside their values (CellMetadata.formula, never written into any output); prefixed SpreadsheetML (#153) and entity-encoded values are read; workbooks saved without calculated results keep their cells. Hidden PPTX and ODP slides are marked, and speaker notes no longer end with the notes page's slide number (#137, #138).


⚠️ Behaviour changes

  • PDF output leaves hidden slides out, with their notes, as it already does hidden sheets; pdfConfig.printHidden prints them.
  • Markdown asks onNode once about a whole line in an HTML table cell or list item, instead of about each part.

🔧 Also Fixed

  • PDF words are no longer glued together where a font's space glyph reads as a tab (#158), as they were since 8.4.0.
  • Markdown inside HTML table cells is kept, never shown as a code like hxt8aparnhc:0.
  • Equations keep their braces (\frac{a}{b}, not \fracab) in LaTeX, Markdown and every output that writes them.
  • Pictures in PDF list items, headings and footnotes are drawn, and each equation written as its LaTeX source is reported.
  • Pictures are embedded by what their bytes are (a JPEG named .png is drawn), and PPTX, ODP and RTF output no longer fail on a picture whose data is not base64.
  • abortSignal stops reading an archive, and the browser bundles no longer define window.setImmediate.
  • A chart shown at many places, and very large hostile pictures, no longer multiply the output or its memory.

See the full list in the changelog.


🛠 Getting Started

npm install officeparser@8.8.0

🔗 Full Changelog: View v8.8.0 details
🔗 Documentation & Visualizer: officeparser.harshankur.com