Print view and PDF download for guides (#90) #91
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MassiveDynamic/kataba!91
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/90-print-and-pdf"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #90
Summary
A guide prints without the titlebar, breadcrumb and buttons, and can be downloaded as a PDF. Both end with an Attribution Line (new glossary term): instance · guide URL · owner and last edit · "Created with kataba". The PDF is drawn on the server with
@react-pdf/renderer(ADR-0019).Print CSS forces the light colour scheme, prints colours exactly (
print-color-adjust), and sets page margins to 15 mm.pdfis now a reserved guide slug, likeedit.Evidence
After:
guidePdfResponse: a PDF download named after the slug,private, no-store, with the guide's images embedded. A hidden or missing guide gives a 404.renderGuidePdf: every block type, step line kind and annotation shape renders. Text is set in Inter, and Chinese, Japanese and Korean in Noto Sans CJK.guideAttribution: English and German wording, absolute URL.pdfImage: the WebP variant becomes a JPEG.GuideSteps: every image is printed with its annotations.next buildand the standalone build both succeed, and the standalone server serves the PDF with its fonts.Merge Danger
Door: two-way
Rolling back means reverting. Nothing is migrated or stored.
Blast Radius: guide page
StepFigureandStepImageViewer. The screen layout is unchanged, apart from the new buttons beside a guide.pdfwould lose its reading page to the download route.@react-pdf/renderer4.9.0. The PDF renderer mirrors the screen renderer, so a change to rich text blocks or the palette has to be made in both (ADR-0019).🤖 Generated with Claude Code