All projects
Private implementation

Browser-based PDF Generator

JSON-configured documents assembled in the browser, with page-budget pagination and Web Worker computations.

  • JavaScript
  • TypeScript
  • html2canvas
  • jsPDF
  • Web Workers

Documents without a rendering server

Built in December 2025 for a client requirement, this engine assembles multipage documents in the browser. Images, tables, fonts, headers and footers are configured in JSON. There is no visual template editor or public demo.

From template to PDF

I designed the schema, rendering pipeline and available-space pagination. I moved heavy JSON and layout calculations into Web Workers, while browser-side rendering uses html2canvas and jsPDF.

Separate content from page rules

Templates describe pageSize, margins, header, footer, sections and styles. The pagination engine compares an element’s required height with the current page’s remaining budget before placing it. This browser engine is separate from Next Web Business’s server-side QuestPDF integration.

  1. JSON template and data
  2. Worker computes layout budget
  3. Place element or start a page
  4. Browser renders content
  5. jsPDF assembles output
Original schematic of the confirmed pipeline; it is not a product screenshot.
Systems Architecture · WebGL Topology

Interactive 3D Distributed Systems Graph

Live 3D topology visualizing service boundaries, isolation contracts, and asynchronous document rendering pipelines.

DRAG TO ORBIT · CLICK NODE TO INSPECT
Presentation Tier

Web Client

Next.js 16 · React 19
Protocol & TransportHTTPS / WSS · 120fps GSAP
Architecture Contract

App Router RSC with client-side interactive leaves and zero-latency audio synthesis.

Click any node in 3D space to focus its technical boundary.

Handle overflow before placing content

Remaining space accounts for the current vertical position, bottom margin and footer. If an element does not fit, the engine starts a new page and resets the position below the header. Web Workers handle data and layout computations so that this work does not all occupy the main thread.

Available-space algorithm — explanatory pseudocode from the project context
Pseudocode
remainingSpace = pageHeight - (currentY + bottomMargin + footerHeight)requiredSpace = elementHeight + elementMarginTopif requiredSpace > remainingSpace:  finalizeCurrentPage()  startNewPage()  currentY = topMargin + headerHeightplaceElement(currentY)currentY = currentY + requiredSpace

A qualitative performance story

Document assembly requires no server rendering round-trip. I describe the architecture without inventing rendering-time benchmarks or claiming that every oversized element can be split. The repository and client documents remain private.

Discuss this work