Skip to content

v8.4.1

Choose a tag to compare

@github-actions github-actions released this 29 Oct 22:53
· 207 commits to master since this release

v8.4.1: 📝 PDF Forms, Running Headers & Page Numbers

I am pleased to announce the release of officeParser v8.4.1! It reads the values of a filled PDF form as text where they stand, takes an untagged PDF's running headers and footers out of its body text, and writes their page numbers as live page fields in Word, OpenDocument, RTF and LaTeX output.


🌟 Key Highlights

1. A filled PDF form reads as filled

Each form field's value is text at its field, beside its label: a text field's value, a check box or radio button as ☒ or ☐, a choice field's selected options. A value under a table's head is that table's cell, and a date written one character per box reads as one value. Hidden fields, push buttons and signatures are left out.

2. Running headers and footers, and their page numbers

Lines an untagged PDF repeats at the top or bottom of its pages go to auxiliary.headers and auxiliary.footers, as a tagged PDF's do, so text, Markdown and HTML output no longer repeat "Page 3 of 4" on every page. Their page numbers become page fields, so DOCX, ODT, RTF and LaTeX output number each page its own. Where it is unsure, a line stays in the text: a date, a ticket number, a chapter's head that changes, a header only some pages have. pdfParserConfig.keepHeadersAndFootersInPages: true keeps every page's in its place.


🔧 What's Fixed

  • Glyphs a font's CMap leaves out are read by their names, as Poppler reads them: "ni!ht" in a subset font reads "nicht".
  • A JPEG picture in a PDF stays a JPEG, its own bytes, where it was re-encoded as a much larger PNG.
  • White text on a coloured bar keeps the bar as its backgroundColor, so it is no longer invisible in HTML, DOCX, ODT and RTF.
  • A PDF's custom properties are its author's own: pdf.js's structural flags no longer reach Markdown front matter, HTML meta tags or DOCX.
  • HTML output writes no file name under a picture, no lang for a document of no stated language, and pads a table's short rows.
  • LaTeX output writes page fields from any document, Word and ODT ones too, where it printed the saved number on every page.
  • A tagged PDF's header that changes from page to page stays in its pages, where Word output printed the first chapter's on every page.
  • A stamp's picture or a form field's box is read where it is drawn, not at the page's corner.
  • A picture inside a PDF's soft mask is no longer extracted as one of the page's.
  • Text output keeps touching runs together ("example.com." rather than "example.com ."), and spaces runs beside right-to-left text as before.
  • Reading a PDF's marked content holds less memory.

🛠 Getting Started

npm install officeparser@8.4.1

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