github cjnoname/excelts v6.2.0

latest releases: v9.5.4, v9.5.3, v9.5.2...
one month ago

6.2.0 (2026-03-28)

🎉 Highlights: New PDF Module

excelts now ships with 5 full-featured core modules — Excel, Archive, CSV, Stream, and the brand-new PDF.

Just like Archive provides complete ZIP/compression, CSV provides full parsing/formatting, and Stream provides cross-platform streaming — the new PDF module is a full-featured, zero-dependency PDF engine built from scratch in pure TypeScript. It is not just an Excel-to-PDF converter — it is a complete PDF generation library with low-level PDF primitives, font parsing/embedding, text layout, and rendering.

src/modules/
├── excel/      # Full-featured workbook engine (read/write XLSX)
├── archive/    # Full-featured ZIP/compression engine
├── csv/        # Full-featured CSV parsing/formatting
├── stream/     # Full-featured cross-platform streaming
└── pdf/        # ✨ NEW — Full-featured PDF engine
    ├── core/       # PDF objects, streams, cross-references, writer, encryption
    ├── font/       # TTF parsing, font subsetting, glyph metrics, embedding
    └── render/     # Text layout, page rendering, multi-page pagination, exporter

Full PDF engine, not just a converter

The PDF module includes everything needed to generate PDF documents from the ground up:

  • PDF core primitives — objects, streams, cross-reference tables, file writer, encryption support
  • Font engine — TTF/OTF parsing, glyph metrics, font subsetting, embedding
  • Layout engine — text measurement, line breaking, wrapping, multi-page pagination
  • Rendering — cell rendering, border drawing, fill painting, text alignment
  • Excel export — convert any workbook/worksheet to PDF with full style fidelity

Key characteristics

  • Zero dependencies — every layer (PDF objects, font parsing, layout, rendering) is built from scratch in pure TypeScript
  • Cross-platform — works identically in Node.js (22+) and browsers (Chrome 89+, Firefox 102+, Safari 14.1+)
  • Tree-shakeable — import only what you use; the PDF module adds zero overhead if not imported
import { Workbook } from "@cj-tech-master/excelts";
import { exportWorkbookToPdf } from "@cj-tech-master/excelts/pdf";

const workbook = new Workbook();
// ... build your workbook ...

const pdfBytes = await exportWorkbookToPdf(workbook);

Features

  • pdf: Add full-featured zero-dependency PDF module (fdc568b)
  • excel: Add autoFitColumns() and autoFitRows() for auto-sizing (c209bdf), closes #114

Bug Fixes

  • security: Harden input parsing against DoS, prototype pollution, and crash vectors (2eca761)
  • treeshake: Improve tree-shaking for rspack/webpack and add verification script (012493c)
  • worksheet: Remove unnecessary null check for worksheet name length (b804e9c)

Code Refactoring

  • excel: Extract shared worksheet utils and fix TS6 build compatibility (2ac2885)

Don't miss a new excelts release

NewReleases is sending notifications on new releases.