Skip to main content

Format Conversion

Convert documents between formats directly in your browser using WebAssembly.

info

This playground uses the paperjam WASM module to convert documents client-side. No files are uploaded to any server.

Loading WASM module...

Supported Conversions

Source → TargetPDFDOCXXLSXPPTXHTMLEPUBMarkdown
PDF
DOCX
XLSX
PPTX
HTML
EPUB

Python API

import paperjam

# File-to-file conversion
paperjam.convert("input.docx", "output.pdf")

# In-memory conversion
with open("report.docx", "rb") as f:
pdf_bytes = paperjam.convert_bytes(f.read(), from_format="docx", to_format="pdf")

# Convert from an open document
doc = paperjam.open("report.docx")
html_bytes = doc.convert_to("html")

CLI

# Auto-detect formats from extensions
pj convert auto input.docx -o output.pdf

# Explicit target format
pj convert to-html input.pdf -o output.html
pj convert to-epub input.docx -o output.epub