DobradA7 is a web tool (React/Vite) that performs imposition of PDF pages so you can print booklets on A4 paper and fold them into A7 (mini-booklet) or A6 format.
Everything happens locally in your browser (using pdf-lib). No files are uploaded to any server.
https://marco-jardim.github.io/dobrada7/
Upload a PDF, select your format (A7 or A6), and generate a print-ready booklet in seconds.
- A7 Imposition: Turns 16 logical pages into 1 A4 sheet (front/back).
- A6 Imposition: Turns 8 logical pages into 1 A4 sheet (front/back).
- Page Selection: Choose specific pages or ranges (e.g., "1-8, 10-12").
- 100% Client-side: Privacy first, no server processing.
- Responsive Design: Works on desktop and mobile.
- Accessibility: Screen reader friendly with semantic HTML and ARIA attributes.
- Open the application at https://marco-jardim.github.io/dobrada7/
- Select a PDF file.
- Choose the format (A7 or A6).
- (Optional) Select specific pages to include.
- Click Generate Booklet.
- Print the generated PDF on A4 paper.
- For A7: Print Landscape, Double-sided (Duplex).
- For A6: Print Portrait, Double-sided (Duplex).
- Important: Disable "Fit to Page" or "Scale to Fit" options. Print at 100% scale.
┌─────────────────────────────┐
│ │
│ A4 Sheet │
│ │
│ │
└─────────────────────────────┘
↓ Fold 1 (vertical)
┌──────────┬──────────┐
│ │ │
│ A5 │ A5 │
│ │ │
└──────────┴──────────┘
↓ Fold 2 (horizontal)
┌──────────┐
│ A6 │
├──────────┤
│ A6 │
└──────────┘
↓ Fold 3 (vertical)
┌─────┬─────┐
│ A7 │ A7 │
└─────┴─────┘
↓ Cut outer edges
📖 Booklet ready!
- Fold the A4 sheet in half vertically (A4 → A5).
- Fold in half horizontally (A5 → A6).
- Fold in half vertically (A6 → A7).
- Cut the three outer edges (top, bottom, right) to release the pages, keeping the spine intact.
- Print on A4 Portrait.
- Fold the A4 sheet in half horizontally (A4 → A5).
- Fold in half vertically (A5 → A6).
- Cut the outer edges or staple the spine.
If any page appears inverted or out of order, you can adjust the imposition map in src/imposition.js (IMPOSITION_ORDER and ROTATIONS_DEG) and verify again.
- Node.js (v18+)
- npm
git clone https://github.com/marco-jardim/dobrada7.git
cd dobrada7
npm installnpm run devOpen http://localhost:30009 in your browser.
This project uses Vitest and React Testing Library for unit and component testing.
npm testnpm run builddobrada7/
├─ src/
│ ├─ App.jsx # UI and main logic
│ ├─ App.test.jsx # Unit tests for App component
│ ├─ imposition.js # Imposition logic for A7 and A6
│ ├─ imposition.test.js # Unit tests for imposition logic
│ ├─ main.jsx # React/Vite entry point
│ ├─ setupTests.js # Test environment setup
│ └─ styles.css # Basic responsive styles
├─ index.html
├─ vite.config.js
├─ package.json
└─ .github/workflows/deploy.yml
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the GNU General Public License v3 (GPLv3).
See the LICENSE file for terms.
