boxpdf-html

v1.7.0
io.github.earonesty/boxpdf-html Checked 21 hours ago Published 1 month ago

Render HTML to PDF (html_to_pdf) plus boxpdf library docs and templates, for AI agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

html_to_pdf

Render an HTML string (optionally with extra CSS) to a PDF using boxpdf-html. Supports a practical subset of CSS — flex, grid, tables, borders, colors, typography, and compiled Tailwind. No browser or JS execution. Returns the PDF (written to outputPath, or inline as a base64 resource) plus any warnings and unsupported-CSS diagnostics so you can fix the input.

ParameterTypeDescription
html *stringHTML markup. May include <style> blocks and inline styles.
allowRemotebooleanAllow fetching http(s) images. Off by default to prevent SSRF.
baseUrlstringDirectory or URL for resolving relative <img> and background-image URLs. Defaults to the working directory.
cssstringExtra stylesheet injected before render (e.g. compiled Tailwind output).
debugbooleanDraw boxpdf debug overlays.
fontsobjectOptional TTF/OTF file paths to embed instead of the built-in Helvetica family.
marginnumberPage margin in PDF points.
outputPathstringWhere to write the PDF (cwd-relative ok). If omitted, the PDF is returned inline as a base64 resource.
sizestringPage size.

boxpdf_docs

Get focused guidance on using the boxpdf / boxpdf-html libraries directly when html_to_pdf is not enough — custom layout, pagination, tables, fonts, themes, streaming, the HTML API, or Cloudflare Workers.

ParameterTypeDescription
topicstringDocumentation topic. Defaults to quickstart.