Preview documents in the browser, without an office suite
BDF is a browser document-preview suite: it combines converters for many formats (Go/WASM), a browser renderer of about 23 KB gzipped, and a compact intermediate format.
PDF is a portable, PostScript-based format for printing. By contrast, BDF is a lightweight intermediate format built from Canvas 2D drawing commands for fast browser rendering. Generate BDF ahead of time on a server, or convert files in real time in the browser with WebAssembly.
A PDF, drawn from BDF
Converted ahead of time, as a server would. Turn its pages, select its text, search it, zoom.
240 KB as a PDF, 142 KB as BDF with its fonts. The pages are fetched by range requests as they are about to be shown.
Less time, memory and energy for document previews
Compare the same Office files converted by LibreOffice + Poppler and by BDF's Go converter.
- 94%less estimated SoC energy per document
- 470×faster on Synthetic PPTX · 100 slides
- 47×lower maximum RSS on Synthetic PPTX · 100 slides
Conversion + thumbnail time (median)
-
Basic DOCX
LibreOffice + Poppler 0.69 sBDF (Go) 0.05 s -
Basic PPTX
LibreOffice + Poppler 1.01 sBDF (Go) 0.03 s -
Basic XLSX
LibreOffice + Poppler 0.65 sBDF (Go) 0.04 s -
Synthetic XLSX · 4 sheets × 3,000 rows
LibreOffice + Poppler 1.55 sBDF (Go) 0.23 s -
Synthetic PPTX · 100 slides
LibreOffice + Poppler 56.38 sBDF (Go) 0.12 s
Maximum RSS (median)
-
Basic DOCX
LibreOffice + Poppler 161.8 MiBBDF (Go) 43.4 MiB -
Basic PPTX
LibreOffice + Poppler 147.3 MiBBDF (Go) 38.2 MiB -
Basic XLSX
LibreOffice + Poppler 123.7 MiBBDF (Go) 36.0 MiB -
Synthetic XLSX · 4 sheets × 3,000 rows
LibreOffice + Poppler 288.3 MiBBDF (Go) 48.7 MiB -
Synthetic PPTX · 100 slides
LibreOffice + Poppler 1,918.9 MiBBDF (Go) 40.8 MiB
Estimated SoC energy per document
-
Per-document average across Basic DOCX, Basic PPTX, Basic XLSX
LibreOffice + Poppler 4.27 JBDF (Go) 0.24 J
Range across 3 rounds: LibreOffice + Poppler 3.30–7.16 J/document; BDF 0.24–0.25 J/document.
On an Apple Silicon Mac connected to AC power. Time and maximum RSS are medians of 5 fresh-process runs for conversion plus a 256 px first-page thumbnail; the large XLSX and PPTX inputs are synthetic. Energy is an idle-adjusted CPU, GPU and ANE SoC estimate from powermetrics across 3 rounds of Basic DOCX, Basic PPTX, Basic XLSX, divided by completed documents—not a wall-outlet measurement.
Each kind of document, in its own shape
A sheet stays a sheet that scrolls; a book turns its pages. All of them are drawn by the same renderer.
-
PDF
Pages with their fonts, text to select and the structure of tagged PDF. Illustrator files too.
-
EPUB
Books too, with pages that turn: reflowable ones in vertical Japanese, and fixed layouts.
-
PowerPoint
Slides with their masters, charts, SmartArt and formulas.
-
Excel
Sheets that scroll without page breaks, with frozen panes, headers and tabs. CSV, TSV and Parquet files are shown the same way.
-
Word
Pages, or one long column to scroll. Vertical Japanese text too.
-
draw.io
Pages as tabs, with today's AWS icons. Visio drawings too.
-
KiCad
Schematic sheets and boards. Gerber and Excellon files too.
-
Scores
MML, MIDI and MusicXML, engraved as scores that the viewer plays.
-
Audio
MP3, M4A, FLAC, Ogg, WAV and AIFF: the cover art, tags and lyrics on a card that plays, the line being sung marked.
29 formats in all, among them Visio, Illustrator, Photoshop, TIFF, HTML, Markdown and font files: all formats
Try it with your files
Files are converted inside your browser. They are not uploaded.
-
Viewer
Drop a file to view it: search, text selection, pages that turn, scores that play.
-
Forms
A Word, Excel or PowerPoint template with tags, a form made of them, and the filled form as a PDF file.
-
Thumbnails
Thumbnails at four sizes at once, drawn without a browser engine, as on a server.
-
Search text
The text and metadata of a document, page by page, for a search index.
Fit it into your system
Three sample projects, each a small Go server with its pages.
-
Convert in the browser
For documents made in large numbers but seldom opened, such as records kept for audits. The server only makes thumbnails; a file is converted in the browser of whoever opens it.
-
Convert on the server
The server makes the preview and the thumbnail once. Browsers only draw.
-
With a search engine
The text goes to a search engine page by page. A hit opens the document at its page.
Why BDF
No office suite to run
No headless LibreOffice, no cgo, no external program: the converters are Go packages in one binary.
In the shape of the content
Fixed pages for slides and drawings, endless sheets for workbooks, pages or one column for text.
Made for browsers
Instructions map onto Canvas 2D. Fonts, images and compression are left to the browser.
Many formats, one renderer
Search, text selection and the text for screen readers work the same for every format.
Only the converters you need
Each format is a Go package of its own: link in the ones your service needs, or the browser modules for those kinds of files.
Find in page and screen readers
The text lies over the picture as real text, so the browser's own find (Ctrl+F) finds it, and screen readers read its headings, lists and tables.









