Amazon rounds odd page counts up to the next even number before
calculating spine thickness. 99 pages → 100 effective pages gives
0.2347 in (5.96 mm) instead of 0.2324 in (5.90 mm).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PDF 1.4 preserves transparency objects, which KDP's preflight rejects.
Downgrading to 1.3 forces Ghostscript to composite all rgba overlays,
gradient alphas and image opacities into solid pixels during the write.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Runs Ghostscript on output/cover.pdf to produce output/cover-300dpi.png
for visual QC and sharing. Also wired into the `pnpm all` pipeline.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4096×4096 source images decoded simultaneously by Chromium consumed ~3.2 GB,
exhausting WSL2 RAM. Build now uses sharp to downsize to 2550×2550 (8.5 in ×
300 DPI) into output/resized/ before Puppeteer loads them, cutting in-memory
footprint to ~1.25 GB. Also adds all story images (01–12) to the repository.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
networkidle0 is unreliable for large local documents; explicit image
decode check is more robust.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The cover PDF serves this purpose. Removes the page--finale template
block, the finale data loading path in build.js, and all finale CSS.
Page count: 100 → 99 (imprint + title + TOC + 96 scene pages).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Puppeteer writes cover-raw.pdf, Ghostscript converts RGB→CMYK via
-sColorConversionStrategy=CMYK -dProcessColorModel=/DeviceCMYK,
fully embeds fonts (-dPDFSETTINGS=/prepress), and injects title/author
metadata via UTF-16BE pdfmarks. Temp files are cleaned up on success.
Mirrors the same GS pipeline already used in pdf.js for the interior.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a section-title page ("Die Geschichten") as page 3 so all stories
begin on page 4. Image and text for each scene now land on the same
facing spread (even=left image, odd=right text). Page count: 99 → 100.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Puppeteer writes to a temp kaleidoskop-raw.pdf
- Ghostscript re-processes with -dPDFSETTINGS=/prepress to fully embed
all fonts and prevent subsetting (KDP checklist item 6)
- PDF info dict is written via PostScript pdfmarks, with title/author/
subject encoded as UTF-16BE hex to support German umlauts (item 13)
- File size drops from ~108 MB to ~9 MB (placeholder art; will grow with
real 300 DPI illustrations but stays well under KDP's 650 MB limit)
- GS failure falls back gracefully to the raw Puppeteer PDF
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The title page is redundant since the KDP cover (cover.pdf) already
establishes title and author. Interior now opens directly on the
copyright page, followed by the TOC and stories (99 pages total).
Removed unused .page--title CSS from layout and typography.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces Georgia with Cormorant Garamond (display, 300 italic) + Lora
(body) across all cover text. Adds @font-face declarations pointing to
fonts/ (same as interior). Updates gold tokens to match interior palette.
Visual changes: front title in Cormorant light italic with gold gradient
rule below, ❧ ornament replacing ✦, synopsis body in Lora.
cover.js now reads 00-front-matter.md to inject author name into spine,
front, and removes the [AUTOR] placeholder.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces Georgia + per-story color theming with a unified premium
fairytale look: Cormorant Garamond (display/titles) + Lora (body),
warm cream text pages (#faf8f2 with paper noise texture), deep ink
typography (#1e1b18) throughout — no per-story text color variation.
- fonts/: committed WOFF2 files via @fontsource packages; auto-copied
by scripts/setup-fonts.js (runs as postinstall)
- Typography: story number in small caps, hairline rule, ❧ ornament
- Layout: cream background replaces per-story bg, radial glow on title
- build.js: passes frontMatter (author, year) to templates
- Templates: author byline on title page, cleaner imprint page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
scripts/cover.js computes the exact cover canvas dimensions from the
page count in book-meta.json (written by build.js), using the KDP
Premium Color spine formula (0.002347 in/page), and renders a
Nunjucks template to a single PDF containing back cover, spine, and
front cover with bleed (0.125 in) and safe-zone overlay guides.
- `pnpm cover` — generate output/cover.pdf
- `pnpm all` — build interior + both PDFs in one command
- Cover artwork slots: images/cover/front.png, images/cover/back.png
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds the full authoring and build toolchain for "Das Kaleidoskop der
Schlummerwelten" — all 12 story content files in Markdown, Nunjucks
HTML templates, CSS print layout, and Puppeteer-based PDF generation
targeting Amazon KDP (8.5×8.5 in, 0.125in bleed).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>