You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PDF document creation is stuck in the past - from clunky Word docs to complex LaTeX to outdated tools. htmldocs brings document generation into 2025 with a modern developer experience using the tools you already love: <b>React</b>, <b>TypeScript</b>, and <b>Tailwind</b>.
16
+
17
+
## Why
18
+
19
+
htmldocs is a modern toolkit for building documents with the web:
20
+
21
+
-**Styling**: Use modern CSS properties to create visually stunning documents with web-like flexibility.
22
+
23
+
-**Structure**: Create clean layouts using HTML's powerful tools like flexbox, grid, and tables.
24
+
25
+
-**External Libraries**: Seamlessly integrate web libraries like FontAwesome, Bootstrap, and KaTeX
26
+
27
+
-**Dynamic Templates**: Leverage JSX to create reusable document templates with dynamic content:
28
+
```jsx
29
+
functionInvoice({ customer, items, total }) {
30
+
return (
31
+
<Document>
32
+
<Page>
33
+
<h1>Invoice for {customer.name}</h1>
34
+
{items.map(item=> (
35
+
<LineItem {...item} />
36
+
))}
37
+
<Total amount={total} />
38
+
</Page>
39
+
</Document>
40
+
);
41
+
}
42
+
```
43
+
44
+
-**Data-Driven Documents**: Generate documents programmatically by passing data through props or fetching from APIs. Perfect for invoices, contracts, and reports that need dynamic content.
45
+
46
+
-**Version Control**: Track document changes using Git and other version control systems
47
+
48
+
-**Consistency**: Maintain uniform document styling across your organization through shared stylesheets.
49
+
50
+
## Install
51
+
52
+
To create your first htmldocs project, run the following command:
53
+
54
+
```sh
55
+
npx htmldocs@latest init
56
+
```
57
+
58
+
For further instructions or to integrate htmldocs into your existing project, refer to the [Getting Started](https://docs.htmldocs.com/getting-started) guide.
htmldocs is a modern toolkit for building documents with web technologies. It automatically handles the layout and chunking of your document into pages, templating variables using JSX, and hot-reloading your document.
92
+
93
+
htmldocs is built upon Chromium's rendering engine, which means it can render any HTML, CSS, and JavaScript. This is different from other tools like [wkhtmltopdf](https://wkhtmltopdf.org/), [WeasyPrint](https://weasyprint.org/), and [Prince](https://www.princexml.com/), which only support a subset of HTML and CSS.
94
+
95
+
htmldocs also uses the [Paged.js library](https://pagedjs.org/) under the hood. Paged.js is used for layout and chunking, as well as more modern features like margin boxes that aren't fully supported by the W3C's CSS standard.
0 commit comments