# AI To A4 PDF

> Use when generating an A4 PDF, converting AI content into a printable report, designing HTML/CSS documents, comparing quotations, writing tender evaluation reports, making travel booklets, turning presentations into A4 handouts, standardising resumes, improving pagination, or avoiding manual Word-to-PDF formatting.

- Skill: `remyoo7/ai-to-a4-pdf` (Agent Skill, multi-file: 13 files)
- Install (CLI): `npx skillmds@latest add remyoo7/ai-to-a4-pdf`
- Raw SKILL.md: https://api.skillmd.com/api/skills/remyoo7/ai-to-a4-pdf/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: remyoo7 (https://skillmd.com/u/remyoo7)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/remyoo7/ai-to-a4-pdf

---


# AI to A4 PDF

Turn supplied content and files into professional print-ready A4 PDFs using local HTML, CSS, Jinja2, and WeasyPrint.

## Core Workflow

1. Inspect all supplied files and content before drafting.
2. Identify the document type, audience, required sections, and missing facts.
3. Preserve factual accuracy; do not invent missing commercial, legal, financial, safety, or personal details.
4. Choose the closest template from `templates/`.
5. Structure content into semantic document data.
6. Render editable HTML with local CSS only.
7. Validate A4 page size, margins, headings, tables, images, long text, and page breaks.
8. Render the PDF with WeasyPrint.
9. Inspect the output for overflow, blank pages, clipped text, broken tables, and poor page breaks.
10. Regenerate until the HTML and PDF pass validation.
11. Return both the editable HTML path and final PDF path.
12. Clearly report missing, unreadable, uncertain, or excluded source information.

## Load References When Needed

- Use `references/document-design-guide.md` for layout, hierarchy, template selection, and report components.
- Use `references/print-css-guide.md` for WeasyPrint paged-media CSS, tables, page numbers, headers, and page-break rules.
- Use `references/supported-inputs.md` for JSON, YAML, Markdown, text, images, and presentation handout inputs.
- Use `references/troubleshooting.md` when rendering fails or the PDF has overflow, clipped text, blank pages, or bad pagination.
- Use `references/security-and-privacy.md` for confidential documents, local processing, path safety, temporary files, and untrusted HTML.

## Commands

```bash
python scripts/generate_pdf.py --input examples/professional-report/input.json --template professional-report --output output/report.pdf
ai-to-a4-pdf build examples/quotation-comparison/input.json --template quotation-comparison --output output/quotation.pdf
```

## Guardrails

- Operate locally by default; never upload source files without explicit user approval.
- Do not use remote CDNs, Google Fonts, JavaScript, or live internet resources during PDF rendering.
- Escape untrusted content by default.
- Do not log secrets, tokens, passwords, or private source content.
- Do not treat commercial tender evaluation as technical, legal, safety, or background due diligence unless source evidence supports it.

