diff --git a/output/cover.pdf b/output/cover.pdf index 0d4eb79..8e0109b 100644 Binary files a/output/cover.pdf and b/output/cover.pdf differ diff --git a/scripts/cover.js b/scripts/cover.js index 0825597..22e2ba3 100644 --- a/scripts/cover.js +++ b/scripts/cover.js @@ -90,8 +90,9 @@ async function generate() { console.warn('Run `pnpm build` first for an accurate spine width.\n'); } - // Compute dimensions - const spineWidth = pageCount * SPINE_PER_PAGE; + // Amazon rounds odd page counts up to even before computing spine width + const effectivePageCount = pageCount % 2 === 0 ? pageCount : pageCount + 1; + const spineWidth = effectivePageCount * SPINE_PER_PAGE; const totalWidth = BLEED_IN + TRIM_W_IN + spineWidth + TRIM_W_IN + BLEED_IN; const totalHeight = BLEED_IN + TRIM_H_IN + BLEED_IN;