gitwtfhub

wtf is taepdf?

silly-tae/taepdf — explained in plain English

Analysis updated 2026-05-18

4TypeScriptAudience · developerComplexity · 2/5Setup · easy

TL;DR

taepdf turns HTML and CSS into a pixel-perfect PDF entirely inside the browser, using a Rust and WebAssembly engine that reads the page's real rendered layout, with no server or headless browser needed.

Mindmap

mindmap
  root((taepdf))
    What it does
      HTML to PDF export
      Reads live DOM layout
      Rust and WASM engine
      Pixel-perfect output
    Tech stack
      TypeScript
      Rust
      WebAssembly
    Use cases
      Invoices and receipts
      Client-side PDF export
      Live document preview
    Limitations
      Browser only
      No Node or SSR
      ES modules only

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Generate downloadable invoices, receipts, or reports from an HTML template inside a web app.

REASON 2

Export a document as a PDF that visually matches exactly what the user sees on screen, without server-side rendering.

REASON 3

Add client-side PDF export to a SvelteKit, Next.js, or Nuxt app without setting up a backend PDF service.

What's in the stack?

TypeScriptRustWebAssembly

How it stacks up

silly-tae/taepdf0labs-in/vision-linkalfons-fhl/cursor-plan2api
Stars444
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderatemoderate
Complexity2/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 30min

Client-side only, must be excluded from server-side rendering in meta-frameworks like Next.js or SvelteKit.

No license information found in the README excerpt.

Wtf does this do

taepdf is a browser-based tool that turns HTML and CSS into a real PDF file. Instead of running on a server or spinning up a hidden browser instance, it works entirely inside the user's own browser tab, reading the exact position, size, color, and font of every element straight from the page's DOM, then handing that information to a Rust and WebAssembly engine that rebuilds it as a PDF. Because it reads what the browser has already rendered, the PDF matches the on-screen layout pixel for pixel, with no separate layout engine trying to guess at the result. The library is browser-only by design. It depends on DOM functions that simply do not exist in Node.js, Bun, Electron, Tauri, or any server-side rendering environment, so it cannot run in those contexts. If a project uses a framework like SvelteKit, Next.js, or Nuxt, the code that calls taepdf has to run specifically on the client side. It also ships only as modern ES modules, with no older CommonJS version, though current bundlers like Vite, webpack, and esbuild handle that automatically. Getting started is a single npm install followed by one import line, after which the engine begins preparing itself automatically. There is no separate WASM setup, font registration, or build plugin configuration required. A companion command line tool, run with npx taepdf, generates a starter template file for a document, which a developer then edits to describe their own PDF layout in HTML. A typical project ends up with two small custom files: a template function that turns data into an HTML string, and a small export utility that passes that HTML to the library's download function along with a filename and page size. The same template can also power a live, in-browser preview of the document before it is exported, so the layout only needs to be designed once. The README goes on to cover topics like pagination, headers and footers, right-to-left text, interactive forms, and framework-specific setup guides. The full README is longer than what was shown.

Yoink these prompts

Prompt 1
Write a taepdf template function that turns invoice data into an HTML string for a one-page PDF.
Prompt 2
Show me how to call pdf.download() with an A4 page size and a dynamic filename.
Prompt 3
How do I make sure taepdf only runs on the client side in a Next.js app?
Prompt 4
Create a live preview component that shares the same HTML template used for a taepdf export.

Frequently asked questions

wtf is taepdf?

taepdf turns HTML and CSS into a pixel-perfect PDF entirely inside the browser, using a Rust and WebAssembly engine that reads the page's real rendered layout, with no server or headless browser needed.

What language is taepdf written in?

Mainly TypeScript. The stack also includes TypeScript, Rust, WebAssembly.

What license does taepdf use?

No license information found in the README excerpt.

How hard is taepdf to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is taepdf for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.