PDFreact-print-pdf
DocsBrowser-only alpha

Limitations

The honest 0.2 beta boundaries.

Edit this page

react-print-pdf is at 0.2.0. It is useful today for controlled document exports, but it is not a complete browser print engine.

Runtime

  • Browser-only for v1.
  • React-only public integration for now.
  • exportToPDF takes an HTMLElement, not JSX.
  • No Node/SSR export path yet.

Layout

  • The printable root should fit the PDF content width.
  • A4 portrait with 20mm margins is roughly 640px wide in DOM space.
  • Complex CSS Grid layouts need visual verification.
  • Auto-fit / scale-to-page is not implemented yet.

Drawing

  • border-radius is honored for fills and for borders, including mixed per-side widths via an even-odd donut fill.
  • Mixed per-side border colors are simplified.
  • Text decoration (underline, line-through, overline) is drawn; text shadow is not.
  • Letter spacing and word spacing can drift because text is emitted as PDF text runs.
  • SVG is rasterized, not converted to PDF vector paths.
  • <a href> to http(s), mailto:, and tel: URIs becomes a clickable PDF Link annotation, with one annotation per visual line. Internal anchors (href="#id") and unsafe schemes (javascript:, data:, etc.) are skipped — the text still renders.

Pagination

  • Widows and orphans are ignored.
  • Repeat-band space is reserved conservatively.
  • break-inside: avoid can leave extra space at the page bottom.
  • A break-inside: avoid block taller than a page will split.
  • Tall cards (background-color + uniform border) split cleanly across pages with rounded corners only on start/end. Mixed per-side border colors and gradient backgrounds disqualify the split path — they fall back to the legacy atomic rectangle and may leave blank space on continuation pages.

Images

  • Direct image embedding supports PNG and JPEG only.
  • GIF, WebP, and AVIF are dropped.
  • object-fit: fill | contain | cover is honored on <img>. none and scale-down collapse to the default fill.
  • Remote images need CORS access.

Raster fallback

  • Rasterized text is no longer selectable.
  • Large raster regions increase PDF size.
  • Cross-origin assets inside raster regions can fail to inline.

Security and privacy

The library runs in the browser and does not upload your DOM or PDF bytes anywhere. Your app is still responsible for where it sends the resulting Blob or Uint8Array.

Roadmap candidates

Likely follow-on work for 0.2.0 final and 0.3:

  1. Internal anchor support (href="#section") alongside PDF outline tree
  2. Debug overlay (?debug flag) drawing primitive boxes on top of the PDF preview
  3. SVG-to-vector experiments (today SVGs go through the raster fallback)

On this page