pdfcn README

The project's README from github.com/shadcn-labs/pdfcn. As one markdown file: README.md.

pdfcn banner

pdfcn

Free & open-source, ready-to-use, customizable PDF components for React.
Copy, paste, and ship. Built on Takumi and Forme, works seamlessly with shadcn/ui.

GitHub Stars CI Discord Members X Follow

Get Started · Installation · Components · Blocks

Features

Community

The pdfcn community lives on GitHub, where you can ask questions, share ideas, and show what you've built.

Contributing

Contributions are welcome. See CONTRIBUTING.md to get the repo running locally and land a change, and use issues and discussions to collaborate. By participating, you agree to the Code of Conduct.

Security

Please do not open public issues for security vulnerabilities. Follow SECURITY.md and report them privately through GitHub Security Advisories.

License

MIT

Contributors

Contributors

Made with contrib.rocks

Sponsors

This project is proudly supported by:

Gold sponsors
React Bits Pro

Found this project useful? Sponsor us to help with support and maintenance.

Stats

Stats

Star History

Star History Chart

pdfcn (shadcn-labs/pdfcn)

Searching Database…

2.9K ·GitHub
这是什么?pdfcn 是一套免费开源、开箱即用且可自定义的 React PDF 组件合集,你把组件复制进自己的项目然后发布,而不是作为依赖安装。
这是我要导入的库,还是像 shadcn 那样复制进来的组件集?它的工作方式与 shadcn/ui 一样:使用相同的注册表格式和 CLI 工作流把组件源码复制进你自己的代码库,因此代码归你所有,可以直接修改。
怎么把 pdfcn 组件添加到我的 React 项目?使用兼容 shadcn/ui 的 CLI 工作流,从 pdfcn 的注册表拉取单个组件和块——表格、表单、图表、发票、报告等等。
我需要单独配置 Takumi 或 Forme 吗?不需要,每个组件通过两个内置渲染引擎(Takumi 或 Forme)之一渲染其 PDF,由你决定某个组件使用哪一个。
它有预配置吗,还是需要大量调整才能用?它是零配置的,凭借合理的默认值开箱即用,同时如果你还想进一步自定义,也暴露了 props 和共享主题。
Takumi 和 Forme 是什么?它们是 pdfcn 构建其上的两个独立 PDF 渲染引擎,每个组件都可以让你选择由哪个引擎生成输出。
使用之前可以先预览组件吗?可以,每个组件和块都在文档中直接渲染了实时预览,复制进来之前就能看到输出效果。
生成的 PDF(比如发票或报告)可以重新设计样式吗?可以,组件带有合理的 props 和共享主题,而且由于代码是复制进你项目的,完全归你所有,可以随意修改。
使用 pdfcn 需要学习新的组件 API 吗?基本不需要——它由专注的 React 组件和渲染原语组合而成,你构建文档的方式和构建普通 React 界面一样。
Size
5 MB
Stars
2.9K
Updated
CommitOct 15
Age
2mo
Commits · 90 Days