momijizukamori / bookbinder-js

A JS application to format PDFs for bookbinding.
Mozilla Public License 2.0
156 stars 33 forks source link

bookbinder-js

A JS application to format PDFs for bookbinding, based on Bookbinder, rewritten to use PDF-Lib as its backend library. Like Bookbinder, it is licensed under the Mozilla Public License.

Using

Go to the project page to use the app online - saving a complete copy of the webpage will enable you to load it locally without a web connection, too.

A very helpful guide on page size given layout and paper selection has been created and can be found HERE.

Snapshot of the size chart as of 2022-08-11 Snapshot of sizes as of 2022-08-11

Contributing

See the contributing documentation!

Dev script cheatsheet

npm run dev          # Starts the development server (auto-refreshes changes) on http://localhost:5173/bookbinder-js/
npm run build        # Builds output files into the /dist folder, to be copied and served elsewhere
npm run preview      # Builds output files into the /dist folder and serves locally on http://localhost:4173/bookbinder-js/
npm run test         # Runs vitest, and auto-retests if you make changes to test files
npm run test:unit    # Runs the unit tests (fast) with vitest, and auto-retests if you make changes to test files
npm run test:pdf     # Runs the pdf check tests (slow), and auto-retests if you make changes to test files
npm run lint         # Runs ESLint to check for coding style violations
npm run lint:fix     # Runs ESLint to check for coding style violations, and attempts to fix all easily-fixed ones
npm run prettier     # Runs Prettier to check for file formatting violations
npm run prettier:fix # Runs ESLint to check for file formatting violations, and attempts reformat any bad files

To close out of any of the commands that don't automatically exist (dev, preview, and test), type q and then hit Enter.

Running Locally

npm install
npm run dev

And load http://localhost:4173/bookbinder-js/ in any modern web browser.

Auditing Results

In the /docs directory:

Snapshot of layout proof summary as of 2022-08-14 Snapshot of layout proof summary 2022-08-14