DocsBrowser-only alpha
Limitations
The honest 0.2 beta boundaries.
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.
exportToPDFtakes anHTMLElement, not JSX.- No Node/SSR export path yet.
Layout
- The printable root should fit the PDF content width.
- A4 portrait with
20mmmargins is roughly640pxwide in DOM space. - Complex CSS Grid layouts need visual verification.
- Auto-fit / scale-to-page is not implemented yet.
Drawing
border-radiusis 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>tohttp(s),mailto:, andtel: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: avoidcan leave extra space at the page bottom.- A
break-inside: avoidblock 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 | coveris honored on<img>.noneandscale-downcollapse to the defaultfill.- 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:
- Internal anchor support (
href="#section") alongside PDF outline tree - Debug overlay (
?debugflag) drawing primitive boxes on top of the PDF preview - SVG-to-vector experiments (today SVGs go through the raster fallback)