2025-10-12 15:24:29 +05:30
# Contributing to BentoPDF
First off, thank you for considering contributing to **BentoPDF ** ! Your help makes this project better for everyone.
This document outlines how to contribute, report issues, and get involved in the project.
---
## 1. How to Contribute
You can contribute in several ways:
2025-10-17 11:37:32 +05:30
- **Reporting Bugs:** If you find a bug or unexpected behavior, please open an issue. Include steps to reproduce and any relevant screenshots or logs.
- **Feature Requests:** Suggest new features or improvements by opening an issue and describing your idea clearly.
- **Code Contributions:** Submit a pull request with new features, bug fixes, or improvements.
- **Documentation:** Help improve the README, usage examples, or guides.
- **Testing:** Help test new releases or changes to ensure stability.
2025-10-12 15:24:29 +05:30
---
2025-10-15 12:57:38 +05:30
### Issue Template
When reporting bugs, requesting features, or asking questions, please use our [issue template ](.github/ISSUE_TEMPLATE/bug_feature_question.md ). The template will automatically appear when you create a new issue.
**Our issue template helps you provide:**
2025-10-17 11:37:32 +05:30
2025-10-15 12:57:38 +05:30
- Clear categorization (Bug, Feature Request, or Question)
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Environment details
- Screenshots or logs
**Title Format Examples:**
2025-10-17 11:37:32 +05:30
2025-10-15 12:57:38 +05:30
- `(Bug) Text alignment incorrect on multi-line paragraphs`
- `(Feature) Add support for custom PDF metadata`
- `(Question) How to embed custom fonts?`
### Pull Request Template
When submitting code contributions, please use our [pull request template ](.github/pull_request_template.md ). The template will automatically appear when you create a new PR.
**Key requirements:**
2025-10-17 11:37:32 +05:30
2025-10-15 12:57:38 +05:30
- Link to the related issue (e.g., `Fixes #123` )
- Describe the type of change (bug fix, feature, breaking change)
- Explain how you tested your changes
- Complete the checklist before submitting
2025-10-12 15:24:29 +05:30
## 2. Getting Started with Code Contributions
1. **Fork the Repository **
2025-10-17 11:37:32 +05:30
2025-10-12 15:24:29 +05:30
```bash
2025-10-12 20:26:24 +05:30
git clone https://github.com/alam00000/bentopdf.git
2025-10-12 15:24:29 +05:30
cd bento-pdf
npm install
```
2. **Create a New Branch **
2025-10-17 11:37:32 +05:30
2025-10-12 15:24:29 +05:30
```bash
git checkout -b feature/my-new-feature
```
3. **Make Your Changes **
2025-10-17 11:37:32 +05:30
- Follow the code style and conventions used in the project.
- Add comments where necessary.
- Update or add tests if applicable.
2025-10-12 15:24:29 +05:30
4. **Run Tests **
2025-10-17 11:37:32 +05:30
2025-10-12 15:24:29 +05:30
```bash
npm run test
```
5. **Commit Your Changes **
2025-10-17 11:37:32 +05:30
2025-10-12 15:24:29 +05:30
```bash
git add .
git commit -m "Add a meaningful commit message"
```
6. **Push and Submit a Pull Request **
2025-10-17 15:01:48 +05:30
2025-10-12 15:24:29 +05:30
```bash
git push origin feature/my-new-feature
```
2025-10-17 11:37:32 +05:30
- Open a pull request on GitHub and provide a clear description of your changes.
2025-10-12 15:24:29 +05:30
---
## 3. Code Style
2025-10-17 11:37:32 +05:30
- Follow the existing TypeScript and JavaScript conventions.
- Use `camelCase` for variables and functions.
- Keep lines reasonably short and readable.
- Comment complex logic for clarity.
2025-10-12 15:24:29 +05:30
---
## 4. Issues and Pull Requests
2025-10-17 11:37:32 +05:30
- Make sure your PR is focused and addresses a single issue or feature.
- Reference related issues in your PR description (e.g., `Closes #12` ).
- Be responsive to feedback and make requested changes promptly.
2025-10-12 15:24:29 +05:30
---
## 5. Reporting Security Issues
If you discover a security vulnerability, please **do not ** open a public issue. Instead, contact the project maintainer directly at:
2025-10-12 20:26:24 +05:30
**Email:** [contact@bentopdf.com ](mailto:contact@bentopdf.com )
2025-10-12 15:24:29 +05:30
---
## 6. Code of Conduct
All contributors are expected to follow the Code of Conduct. Be respectful and considerate in all communications.
---
Thank you for helping make **BentoPDF ** a better library for everyone!