Skip to content

v0.4.0

Latest

Choose a tag to compare

@imggion imggion released this 30 Nov 21:43
8c11784

What's Changed

  • New renderImage() renders HTML to JPEG with a native rasterizer from the same display list as the PDF: quality, scale, chroma subsampling, width and background options, auto-height pages, and limits of 4096 CSS px width and 16.7M output pixels. By @imggion in #17
  • HTML strings rendered in Node (new node export condition, also html2realpdf/node) keep inline <svg>: presentation attributes, inline styles, class rules, var() and currentColor are honored and the SVG stays vector. Unsupported SVG and non-embedded resources report diagnostics instead of being fetched. By @imggion in #17
  • Renders are 4–10× faster: HarfBuzz faces and font metrics are reused within a render, intrinsic sizes are memoized, and cluster mapping is O(n log n). A 30-page stress report goes from ~1.7 s to ~0.16 s. By @imggion in #17
  • Peak memory is roughly halved on long documents because clip and opacity stacks are now shared instead of copied, and the JS bridge reads WASM addresses unsigned so documents above 2 GiB of linear memory work. By @imggion in #17
  • CSS Grid auto-placement no longer hangs past 64 implicit rows: the implicit grid grows up to 10,000 tracks and long grids paginate in linear time. By @imggion in #17
  • Native C/C++ dependencies are built for the baseline CPU, so a cached build no longer crashes with Illegal instruction on a different machine. By @imggion in #17
  • Document-profile PDFs are byte-identical to v0.3.2, except analytics-report, which now includes its two inline SVG charts. By @imggion in #17

Full Changelog: v0.3.2...v0.4.0