Skip to main content
BentoPDF is open source and welcomes contributions of all kinds. Whether you want to fix a bug, add a new tool, improve documentation, or translate the UI into a new language, your help makes the project better for everyone.

Prerequisites

Before you begin, make sure you have the following installed:
  • Node.js 18 or higher
  • npm 9 or higher
  • Git

Setting up locally

1

Fork and clone the repository

Fork the repository on GitHub, then clone your fork:
git clone https://github.com/YOUR_USERNAME/bentopdf.git
cd bentopdf
2

Install dependencies

npm install
3

Start the development server

npm run dev
The app will be available at http://localhost:5173.

Project structure

bentopdf/
├── src/
│   ├── js/
│   │   ├── config/       # Tool definitions
│   │   ├── logic/        # Tool page logic
│   │   ├── utils/        # Shared utilities
│   │   └── ui.ts         # UI helpers
│   ├── pages/            # Tool HTML pages
│   └── css/              # Styles
├── public/
│   ├── locales/          # Translations
│   └── pymupdf-wasm/     # WASM modules
├── docs/                 # Documentation (VitePress)
└── scripts/              # Build scripts

Adding a new tool

1

Create the logic file

Create src/js/logic/your-tool-page.ts with a DOMContentLoaded handler:
import { showLoader, hideLoader, showAlert } from '../ui.js';
import { state } from '../state.js';

document.addEventListener('DOMContentLoaded', () => {
    // Your tool logic here
});
2

Create the HTML page

Create src/pages/your-tool.html, following the structure of an existing tool page as a template.
3

Register the tool

Add the tool entry to src/js/config/tools.ts:
{
  href: import.meta.env.BASE_URL + 'your-tool.html',
  name: 'Your Tool',
  icon: 'ph-icon-name',
  subtitle: 'Description of your tool.',
}
4

Add to the build config

Register the page in vite.config.ts under the build inputs:
'your-tool': resolve(__dirname, 'src/pages/your-tool.html'),
5

Add translations

Add the tool’s name and subtitle to every locale file in public/locales/:
{
  "yourTool": {
    "name": "Your Tool",
    "subtitle": "Description"
  }
}

Code style

  • Use TypeScript for all new code.
  • Follow the existing patterns and conventions in the codebase.
  • Run npm run format before committing to ensure consistent formatting.
  • Comments are stripped from production builds — avoid adding comments to production code.

Pull request process

1

Create a feature branch

git checkout -b feature/your-feature
2

Make and test your changes

Make your changes, then verify the build passes:
npm run build
3

Submit a pull request

Push your branch and open a pull request on GitHub. Include a clear description of what you changed and why. Reference any related issues (e.g., Fixes #123).
Make sure your PR is focused on a single issue or feature. Be responsive to review feedback.

Contributor License Agreement

Before your pull request can be merged, you must sign a Contributor License Agreement (CLA). This is required because BentoPDF uses a dual-license model and the CLA ensures your contributions can be included in both the open-source and commercial versions. By contributing, you agree that your contributions will be licensed under the project’s AGPL-3.0 and Commercial License terms.

Translations

BentoPDF is available in 14 languages. To add a new language or improve an existing translation, see the Translation Guide on GitHub.

Reporting issues

Use the GitHub issue template when reporting bugs, requesting features, or asking questions. For security vulnerabilities, do not open a public issue — email contact@bentopdf.com directly.

Getting help

GitHub Issues

Report bugs, request features, or ask questions.

Discord Community

Chat with the community and the maintainers.

Build docs developers (and LLMs) love