From dc4a99b782ad5285d5543943a3fc8779cf373df6 Mon Sep 17 00:00:00 2001 From: Cocoa Date: Tue, 5 Mar 2024 18:47:34 -0500 Subject: [PATCH] Split HTML to make it easier to edit. --- index.html | 645 +------------------------------------ package-lock.json | 73 ++++- package.json | 3 +- src/html/buttons.html | 28 ++ src/html/file.html | 21 ++ src/html/flyleaf.html | 12 + src/html/page_layout.html | 149 +++++++++ src/html/preview.html | 19 ++ src/html/printer.html | 74 +++++ src/html/sig_format.html | 244 ++++++++++++++ src/html/source_manip.html | 57 ++++ vite.config.js | 3 +- 12 files changed, 684 insertions(+), 644 deletions(-) create mode 100644 src/html/buttons.html create mode 100644 src/html/file.html create mode 100644 src/html/flyleaf.html create mode 100644 src/html/page_layout.html create mode 100644 src/html/preview.html create mode 100644 src/html/printer.html create mode 100644 src/html/sig_format.html create mode 100644 src/html/source_manip.html diff --git a/index.html b/index.html index 944f07a..250b012 100644 --- a/index.html +++ b/index.html @@ -29,643 +29,14 @@

Bookbinder JS

-
-

File Info

- - - - While some PDF viewers display the first two pages as a spread, be aware the first - page, which is odd, will be on the right when printed. The first printed spread are - pages 2 & 3 of your PDF document. Evens always on the left, odds always on the - right. - - - -
- -
-

Source Manipulation

- - -
-
- -

-
- For books that read like a standard novel
- no rotation of pages applied -

-
- - - - -
-
- - - -
-

Printer

- - - - - - - - - - x - - (in Points) - ℹ️ - - - - - ℹ️ - - - - ℹ️ - - - - - NOTE: Not currently working for folios, sorry! Use the - old version - for now. -
- -
-

Page Layout

- - -
- - - -
- -
-
- -
- Folding instructions for quarto/octavo -

- Folding these two layouts is slightly more complex than the simple single-fold - folio. Both of these have been designed so that the first fold is parallel to the - short edge of the paper - eg, if you hold the page in portrait orientation, you will - be folding the top edge to the bottom. One side of the page will have consecutive - numbers across this fold (ie, 3 and 30 on the top row, 2 and 31). Fold inward across - this line (so that 3 has been folded to lay against 2, and 30 against 31). The next - fold is along the other paper axis (parallel to the original long edge). For quarto, - you want to find the side with the numbers closest together, and fold inwards to - match them (this will be consecutive on the innermost sheet). For octavo, look at - the bottom-most row and find the consecutive pair, then fold inward. Octavo has one - last fold, for which you want to find the pair remaning that are closest, and fold - them together. -

-

- Or, if you want to just memorize the order, once you find the first fold side, the - order is:
- quarto - top to bottom, fold points away from you, left to right, fold points - towards you.
- octavo - top to bottom, fold points away from you, left to right, fold points - away from you, top to bottom, fold points towards you. -

-
- - - - - - - - - - - - -
- White Space Manipulation. All values are in points, relative to original document.

1 - point = 1/72 inch -
-
- Fore-Edge Margin: - pt
- Binding Margin: - pt
- Top Margin: - pt
- Bottom Margin: - pt
-
-
- - -
spine
-
-
- Paper/Layout Dimensions - layout:
- max page size: -
-
-
- PDF Dimensions
- source:
- on page:
- scaling:
- offset: -
-
-
-
- rotated:
-
- (all dimensions are in Points) -
- -
-
-
-
-
- -
-

Signature Format

- - - - - - - - - - - length - ℹ️ - - - - - - ℹ️ - - -
- A note on calculating signature lengths -

- In this code, the length of a signature is the number of full-sized sheets of paper - per signature. For a folio book, this means that the number of folds you punch - through when sewing together a signature is the same as the number of sheets in the - signature, as each sheet has one fold. For quarto, this will be two folds for each - sheet - octavo, four; sextodecimo, eight. Calculate your signature lengths - accordingly (in particular, you almost certainly don't want more than one sheet for - sextodecimo). -

-
- -

Wacky Small Layouts

- These layouts contain one or more signature per printed page. They use only the "File - Info" and "Printer" settings. The names are arbitrary and hold no standardized - meaning. - Fore-Edge Padding:
- pt
- - - -
- - -
- - - - - -
- Instructions -

- Cut along the lines or cut just extra bit off the top (along exposed "top" of - page) and then fold up along the dotted lines (if trimming, you can just trim off - the cruft at the bottom-- tops need to be even for leveling purposes however). Outer - margins intentionally under-marked so you can trim wherever feels right after - folding & assembly. -

-

- Not the most paper efficient of layouts, but it's optimized for organization (if a - signature is just one page, harder to botch the ordering) and many, smaller - signatures make for rounder backs and large swell in my [six's] opinion (which helps - w/ nice shoulders, if you're into that sort of thing) -

-
-
- - - - - -
- Instructions -

-

- -
- Cut the vertical center line. You can also cut the horizontal lines if you like, or - just fold it up as detailed above. -

-
-
- - - - - -
- Instructions -

- The classic no-cut, single page zine! Just fold it up right and you've got yourself - a mutant non-standard folio making an 8 page little fellow-- all extra pages beyond - 8 are discarded. For better folding instructions than I could possibly write, see: - https://www.quarantinepubliclibrary.com/tutorial -

-
-
- - - - - -
- Instructions -

- - THIS IS A LANDSCAPE LAYOUT. IT MUST BE PRINTED AND "flipped on the short side" - (the non-typical flipping) -
- Remember to do a single-sheet test print if it's your first time to make sure - duplex/mirroring is correct! -

-

- Cut out the rows. Fold up the folios like a zig-zag (two per face). Then fold the - center of the text (smoosh the two matching page numbers together). -

-

- Note that when folding, it's important for the - center of the folios to line up. That's what I measure against (less so - fretting about folding exactly at the edge). Remember! Printer skew is a real thing! -

-
-
- - - - - -
- Instructions -

-

- -
- Cut along the cut lines. Fold up the 3 folio signatures, then the 4 folio. -

-
- - - - - -
- Instructions -

- - THIS IS A LANDSCAPE LAYOUT. IT MUST BE PRINTED AND "flipped on the short side" - (the non-typical flipping) -
- Remember to do a single-sheet test print if it's your first time to make sure - duplex/mirroring is correct! -

-

- Cut out the rows. Fold up the folios like a zig-zag (two per face). Then fold the - center of the text (smoosh the two matching page numbers together). -

-

- Note that when folding, it's important for the - center of the folios to line up. That's what I measure against (less so - fretting about folding exactly at the edge). Remember! Printer skew is a real thing! -

-
-
- - - - -
- Instructions -

- - THIS IS A LANDSCAPE LAYOUT. IT MUST BE PRINTED AND "flipped on the short side" - (the non-typical flipping) -
- Thankfully most small layouts fit on one page-- easy enough to do a test print and - make sure you're duplexing correctly (if that's your route) -

-

-

- -
- Cut out the rows. Fold up the folios like a big zig-zag (two per face). Then fold - the first 2 folios into a signature and the last 3 folios into a signature. I often - cut them apart only when I'm stitching things together. -

-

- Note that when folding, it's important for the - center of the folios to line up. That's what I measure against (less so - fretting about folding exactly at the edge). Remember! Printer skew is a real thing! -

-
-
-
-

Flyleafs

- - - ℹ️ - -
-
-

Signature Info

- -
- -
-
- Total Pages: - Original PDF Pages: -
-
- Total Sheets: - Number of Signatures: -
-
-
Signature Arrangement:
-
-
-
-
- - - -
+ + + + + + + + diff --git a/package-lock.json b/package-lock.json index 0b20c7d..5384c0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,24 +1,25 @@ { "name": "bookbinder", - "version": "1.3.4", + "version": "1.3.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bookbinder", - "version": "1.3.4", + "version": "1.3.6", "license": "MPL", "dependencies": { "file-saver": "^2.0.5", "jszip": "^3.7.1", "pdf-lib": "^1.16.0", - "vite-plugin-package-version": "^1.1.0", + "vite-plugin-html-inject": "^1.1.2", "zod": "^3.22.4" }, "devDependencies": { "eslint": "^8.56.0", "prettier": "^3.2.5", "vite": "^5.0.10", + "vite-plugin-package-version": "^1.1.0", "vitest": "^1.0.4" } }, @@ -38,6 +39,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "android" @@ -53,6 +55,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "android" @@ -68,6 +71,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "android" @@ -83,6 +87,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -98,6 +103,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -113,6 +119,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "freebsd" @@ -128,6 +135,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "freebsd" @@ -143,6 +151,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "linux" @@ -158,6 +167,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -173,6 +183,7 @@ "cpu": [ "ia32" ], + "dev": true, "optional": true, "os": [ "linux" @@ -188,6 +199,7 @@ "cpu": [ "loong64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -203,6 +215,7 @@ "cpu": [ "mips64el" ], + "dev": true, "optional": true, "os": [ "linux" @@ -218,6 +231,7 @@ "cpu": [ "ppc64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -233,6 +247,7 @@ "cpu": [ "riscv64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -248,6 +263,7 @@ "cpu": [ "s390x" ], + "dev": true, "optional": true, "os": [ "linux" @@ -263,6 +279,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -278,6 +295,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "netbsd" @@ -293,6 +311,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "openbsd" @@ -308,6 +327,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "sunos" @@ -323,6 +343,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -338,6 +359,7 @@ "cpu": [ "ia32" ], + "dev": true, "optional": true, "os": [ "win32" @@ -353,6 +375,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -466,6 +489,7 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, "optional": true, "peer": true, "dependencies": { @@ -481,6 +505,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, "optional": true, "peer": true, "engines": { @@ -491,6 +516,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, "optional": true, "peer": true, "engines": { @@ -501,6 +527,7 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.3.tgz", "integrity": "sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==", + "dev": true, "optional": true, "peer": true, "dependencies": { @@ -512,6 +539,7 @@ "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true, "optional": true, "peer": true }, @@ -519,6 +547,7 @@ "version": "0.3.18", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "dev": true, "optional": true, "peer": true, "dependencies": { @@ -584,6 +613,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "android" @@ -596,6 +626,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "android" @@ -608,6 +639,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -620,6 +652,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -632,6 +665,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "linux" @@ -644,6 +678,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -656,6 +691,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -668,6 +704,7 @@ "cpu": [ "riscv64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -680,6 +717,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -692,6 +730,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -704,6 +743,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -716,6 +756,7 @@ "cpu": [ "ia32" ], + "dev": true, "optional": true, "os": [ "win32" @@ -728,6 +769,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -754,6 +796,7 @@ "version": "20.10.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "dev": true, "optional": true, "peer": true, "dependencies": { @@ -919,7 +962,7 @@ "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", - "devOptional": true, + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -1078,6 +1121,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, "optional": true, "peer": true }, @@ -1181,6 +1225,7 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, "optional": true, "peer": true }, @@ -1350,6 +1395,7 @@ "version": "0.19.9", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.9.tgz", "integrity": "sha512-U9CHtKSy+EpPsEBa+/A2gMs/h3ylBC0H0KSqIg7tpztHerLi6nrrcoUJAkNCEPumx8yJ+Byic4BVwHgRbN0TBg==", + "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -1732,6 +1778,7 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -2238,6 +2285,7 @@ "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, "funding": [ { "type": "github", @@ -2431,7 +2479,8 @@ "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true }, "node_modules/pkg-types": { "version": "1.0.3", @@ -2448,6 +2497,7 @@ "version": "8.4.32", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", + "dev": true, "funding": [ { "type": "opencollective", @@ -2591,6 +2641,7 @@ "version": "4.9.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.1.tgz", "integrity": "sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw==", + "dev": true, "bin": { "rollup": "dist/bin/rollup" }, @@ -2701,6 +2752,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, "optional": true, "peer": true, "engines": { @@ -2711,6 +2763,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -2719,6 +2772,7 @@ "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, "optional": true, "peer": true, "dependencies": { @@ -2806,6 +2860,7 @@ "version": "5.17.6", "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.6.tgz", "integrity": "sha512-V8QHcs8YuyLkLHsJO5ucyff1ykrLVsR4dNnS//L5Y3NiSXpbK1J+WMVUs67eI0KTxs9JtHhgEQpXQVHlHI92DQ==", + "dev": true, "optional": true, "peer": true, "dependencies": { @@ -2931,6 +2986,7 @@ "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, "optional": true, "peer": true }, @@ -2963,6 +3019,7 @@ "version": "5.0.10", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.10.tgz", "integrity": "sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==", + "dev": true, "dependencies": { "esbuild": "^0.19.3", "postcss": "^8.4.32", @@ -3035,10 +3092,16 @@ "url": "https://opencollective.com/vitest" } }, + "node_modules/vite-plugin-html-inject": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vite-plugin-html-inject/-/vite-plugin-html-inject-1.1.2.tgz", + "integrity": "sha512-4DWANEcAw73H5JLWTAI4EvXdSyoGqGq/Is9fTRjpF+SJLor58LNdqB+YYnK3FOLwx6LMTAn4z1hkiRyc52lYLg==" + }, "node_modules/vite-plugin-package-version": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/vite-plugin-package-version/-/vite-plugin-package-version-1.1.0.tgz", "integrity": "sha512-TPoFZXNanzcaKCIrC3e2L/TVRkkRLB6l4RPN/S7KbG7rWfyLcCEGsnXvxn6qR7fyZwXalnnSN/I9d6pSFjHpEA==", + "dev": true, "peerDependencies": { "vite": ">=2.0.0-beta.69" } diff --git a/package.json b/package.json index 3876cf8..7452514 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bookbinder", - "version": "1.3.6", + "version": "1.3.7", "description": "An app to rearrange PDF pages for printing for bookbinding", "type": "module", "scripts": { @@ -26,6 +26,7 @@ "file-saver": "^2.0.5", "jszip": "^3.7.1", "pdf-lib": "^1.16.0", + "vite-plugin-html-inject": "^1.1.2", "zod": "^3.22.4" } } diff --git a/src/html/buttons.html b/src/html/buttons.html new file mode 100644 index 0000000..90bcb8d --- /dev/null +++ b/src/html/buttons.html @@ -0,0 +1,28 @@ +
+ + + +
diff --git a/src/html/file.html b/src/html/file.html new file mode 100644 index 0000000..d6fe792 --- /dev/null +++ b/src/html/file.html @@ -0,0 +1,21 @@ +
+

File Info

+ + + + While some PDF viewers display the first two pages as a spread, be aware the first page, which + is odd, will be on the right when printed. The first printed spread are pages 2 & 3 of your PDF + document. Evens always on the left, odds always on the right. + + + +
diff --git a/src/html/flyleaf.html b/src/html/flyleaf.html new file mode 100644 index 0000000..9d20074 --- /dev/null +++ b/src/html/flyleaf.html @@ -0,0 +1,12 @@ +
+

Flyleafs

+ + + ℹ️ + +
diff --git a/src/html/page_layout.html b/src/html/page_layout.html new file mode 100644 index 0000000..4b55021 --- /dev/null +++ b/src/html/page_layout.html @@ -0,0 +1,149 @@ +
+

Page Layout

+ + +
+ + + +
+ +
+
+ +
+ Folding instructions for quarto/octavo +

+ Folding these two layouts is slightly more complex than the simple single-fold folio. Both + of these have been designed so that the first fold is parallel to the short edge of the + paper - eg, if you hold the page in portrait orientation, you will be folding the top edge + to the bottom. One side of the page will have consecutive numbers across this fold (ie, 3 + and 30 on the top row, 2 and 31). Fold inward across this line (so that 3 has been folded to + lay against 2, and 30 against 31). The next fold is along the other paper axis (parallel to + the original long edge). For quarto, you want to find the side with the numbers closest + together, and fold inwards to match them (this will be consecutive on the innermost sheet). + For octavo, look at the bottom-most row and find the consecutive pair, then fold inward. + Octavo has one last fold, for which you want to find the pair remaning that are closest, and + fold them together. +

+

+ Or, if you want to just memorize the order, once you find the first fold side, the order + is:
+ quarto - top to bottom, fold points away from you, left to right, fold points towards + you.
+ octavo - top to bottom, fold points away from you, left to right, fold points away + from you, top to bottom, fold points towards you. +

+
+ + + + + + + + + + + + +
+ White Space Manipulation. All values are in points, relative to original document.

1 + point = 1/72 inch +
+
+ Fore-Edge Margin: + pt
+ Binding Margin: + pt
+ Top Margin: + pt
+ Bottom Margin: + pt
+
+
+ + +
spine
+
+
+ Paper/Layout Dimensions + layout:
+ max page size: +
+
+
+ PDF Dimensions
+ source:
+ on page:
+ scaling:
+ offset: +
+
+
+
+ rotated:
+
+ (all dimensions are in Points) +
+ +
+
+
+
+
diff --git a/src/html/preview.html b/src/html/preview.html new file mode 100644 index 0000000..023a158 --- /dev/null +++ b/src/html/preview.html @@ -0,0 +1,19 @@ +
+

Signature Info

+ +
+ +
+
+ Total Pages: + Original PDF Pages: +
+
+ Total Sheets: + Number of Signatures: +
+
+
Signature Arrangement:
+
+
+
diff --git a/src/html/printer.html b/src/html/printer.html new file mode 100644 index 0000000..c4434c0 --- /dev/null +++ b/src/html/printer.html @@ -0,0 +1,74 @@ +
+

Printer

+ + + + + + + + + + x + + (in Points) + ℹ️ + + + + + ℹ️ + + + + ℹ️ + + + + + NOTE: Not currently working for folios, sorry! Use the + old version + for now. +
diff --git a/src/html/sig_format.html b/src/html/sig_format.html new file mode 100644 index 0000000..f6cefdf --- /dev/null +++ b/src/html/sig_format.html @@ -0,0 +1,244 @@ +
+

Signature Format

+ + + + + + + + + + - length + ℹ️ + + + + + + ℹ️ + + +
+ A note on calculating signature lengths +

+ In this code, the length of a signature is the number of full-sized sheets of paper per + signature. For a folio book, this means that the number of folds you punch through when + sewing together a signature is the same as the number of sheets in the signature, as each + sheet has one fold. For quarto, this will be two folds for each sheet - octavo, four; + sextodecimo, eight. Calculate your signature lengths accordingly (in particular, you almost + certainly don't want more than one sheet for sextodecimo). +

+
+ +

Wacky Small Layouts

+ These layouts contain one or more signature per printed page. They use only the "File Info" + and "Printer" settings. The names are arbitrary and hold no standardized meaning. + Fore-Edge Padding:
+ pt
+ + + +
+ + +
+ + + + + +
+ Instructions +

+ Cut along the lines or cut just extra bit off the top (along exposed "top" of page) + and then fold up along the dotted lines (if trimming, you can just trim off the cruft at the + bottom-- tops need to be even for leveling purposes however). Outer margins intentionally + under-marked so you can trim wherever feels right after folding & assembly. +

+

+ Not the most paper efficient of layouts, but it's optimized for organization (if a signature + is just one page, harder to botch the ordering) and many, smaller signatures make for + rounder backs and large swell in my [six's] opinion (which helps w/ nice shoulders, if + you're into that sort of thing) +

+
+
+ + + + + +
+ Instructions +

+

+ +
+ Cut the vertical center line. You can also cut the horizontal lines if you like, or just + fold it up as detailed above. +

+
+
+ + + + + +
+ Instructions +

+ The classic no-cut, single page zine! Just fold it up right and you've got yourself a mutant + non-standard folio making an 8 page little fellow-- all extra pages beyond 8 are discarded. + For better folding instructions than I could possibly write, see: + https://www.quarantinepubliclibrary.com/tutorial +

+
+
+ + + + + +
+ Instructions +

+ + THIS IS A LANDSCAPE LAYOUT. IT MUST BE PRINTED AND "flipped on the short side" (the + non-typical flipping) +
+ Remember to do a single-sheet test print if it's your first time to make sure + duplex/mirroring is correct! +

+

+ Cut out the rows. Fold up the folios like a zig-zag (two per face). Then fold the center of + the text (smoosh the two matching page numbers together). +

+

+ Note that when folding, it's important for the + center of the folios to line up. That's what I measure against (less so fretting + about folding exactly at the edge). Remember! Printer skew is a real thing! +

+
+
+ + + + + +
+ Instructions +

+

+ +
+ Cut along the cut lines. Fold up the 3 folio signatures, then the 4 folio. +

+
+ + + + + +
+ Instructions +

+ + THIS IS A LANDSCAPE LAYOUT. IT MUST BE PRINTED AND "flipped on the short side" (the + non-typical flipping) +
+ Remember to do a single-sheet test print if it's your first time to make sure + duplex/mirroring is correct! +

+

+ Cut out the rows. Fold up the folios like a zig-zag (two per face). Then fold the center of + the text (smoosh the two matching page numbers together). +

+

+ Note that when folding, it's important for the + center of the folios to line up. That's what I measure against (less so fretting + about folding exactly at the edge). Remember! Printer skew is a real thing! +

+
+
+ + + + +
+ Instructions +

+ + THIS IS A LANDSCAPE LAYOUT. IT MUST BE PRINTED AND "flipped on the short side" (the + non-typical flipping) +
+ Thankfully most small layouts fit on one page-- easy enough to do a test print and make sure + you're duplexing correctly (if that's your route) +

+

+

+ +
+ Cut out the rows. Fold up the folios like a big zig-zag (two per face). Then fold the first + 2 folios into a signature and the last 3 folios into a signature. I often cut them apart + only when I'm stitching things together. +

+

+ Note that when folding, it's important for the + center of the folios to line up. That's what I measure against (less so fretting + about folding exactly at the edge). Remember! Printer skew is a real thing! +

+
+
diff --git a/src/html/source_manip.html b/src/html/source_manip.html new file mode 100644 index 0000000..c84783a --- /dev/null +++ b/src/html/source_manip.html @@ -0,0 +1,57 @@ +
+

Source Manipulation

+ + +
+
+ +

+
+ For books that read like a standard novel
+ no rotation of pages applied +

+
+ + + + +
+
diff --git a/vite.config.js b/vite.config.js index f0f7009..1ece467 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,10 +1,11 @@ import { defineConfig } from 'vite'; import version from 'vite-plugin-package-version'; +import injectHTML from 'vite-plugin-html-inject'; export default defineConfig({ base: 'https://momijizukamori.github.io/bookbinder-js/', test: { environment: 'jsdom', }, - plugins: [version()], + plugins: [version(), injectHTML()], });