# Exam PDF Compact Reflow

> Compact print reflow and content checking for exam papers, review handouts, math/chemistry PDFs, DOC/DOCX question banks, and slide-exported PDFs. Use when the user asks to make a paper "省纸", "小字", "紧凑", "4页合1页", remove covers/buttons/blank space, insert answers into questions, or check whether a compact re-layout introduced content/formula errors.

- Skill: `zhaolong666520/exam-pdf-compact-reflow` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zhaolong666520/exam-pdf-compact-reflow`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zhaolong666520/exam-pdf-compact-reflow/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: Zhaolong666520 (https://skillmd.com/u/zhaolong666520)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/zhaolong666520/exam-pdf-compact-reflow

---


# Exam PDF Compact Reflow

## Core Goal

Create a small, clear, paper-saving print version while preserving answers and formula meaning. Prefer a readable compact handout over a visually pretty page.

## Workflow

1. Preserve the source and write outputs to an `outputs/` folder. Use descriptive names such as `...省纸版.pdf`, `...文字重排版.pdf`, and `...校正版.pdf`.
2. Inspect the source format before editing:
   - For DOC/DOCX question banks, edit the document structure directly when possible.
   - For slide-exported PDFs, expect text order, superscripts, roots, fraction bars, and equation groups to be damaged by extraction.
   - If exact visual fidelity matters, make an image-based cropped/4-up backup first.
3. If the user says the image/cropped version is still too big or too empty, extract text and rebuild the layout instead of continuing to crop screenshots.
4. Reflow for print:
   - Use A4 landscape for dense math review sheets.
   - Use 3-4 columns, narrow margins, small but printable fonts, and short line heights.
   - Merge one-character or one-token vertical fragments into nearby text.
   - Convert stacked formulas to compact inline notation when clear: `(x-2)/3=(y+3)/(-1)=(z-4)/2`, `√x`, `x^2`, `π/4`, `8πR^3`.
5. Keep answers inside the question flow when the user asks for integrated answers. Do not place a separate answer key unless requested.

## Compact Font Defaults

Use these defaults for short English/plain-text DOCX or PDF handouts after grammar/content cleanup:

- Normal compact version: `Times New Roman`, `10pt`, A4 portrait, margins about `1.2cm` top/bottom and `1.4cm` left/right, line spacing about `1.05`.
- If the user says it is still too large or asks to shrink by about 50%: use `Times New Roman`/`Times-Roman`, `5pt`, A4 portrait, margins about `0.7cm` top/bottom and `0.8cm` left/right, line height around `5.4pt` in direct PDF output or line spacing about `0.75` in DOCX.
- For 50% shrink output, keep paragraph gaps minimal, about `1-2pt`, and preserve readable paragraph indentation around `0.25cm`.
- Verify by rendering a PDF preview; the text should be visibly about half the previous 10pt version while remaining printable.

## Formula Safety

Never trust extracted PDF text alone for math. Render original pages as images and compare suspicious formulas visually.

High-risk extraction errors:

- Fraction bars become `= =` or disconnected numbers.
- Superscripts disappear: `π^2`, `R^3`, `x^2`, `e^2`.
- Radicals disappear: `√2`, `√x`, `√(x^2+y^2)`.
- Absolute values disappear: `|AB|=13`.
- Integral bounds detach from `∫`.
- Non-Latin glyphs appear from bad symbol extraction, such as `൜`, `න`, `อ`, replacement characters, or stray boxes.
- Final answers lose a denominator, e.g. `-1/4` becomes `- .`.

When uncertain, do not invent a formula. Either keep the original image-based version as the fidelity backup or state that the text version needs manual verification at that location.

## Content Audit Checklist

After generating a compact text version, search the extracted output for:

```text
= =
R= =
113
� □ ?
൜ න อ
α=
|AB|
π^2
R^3
√
```

Then manually check:

- Corrected source mistakes remain corrected, for example the vector dot-product example in this run was `-39`, not the source's wrong `-113`.
- All final answers with powers keep their powers: `e^2`, `-6π^2`, `8πR^3`.
- Short final answers are not truncated: `π/4`, `√2`, `-1/4`, `15π/8`.
- Line/normal equations are not left as broken stacked fragments; rewrite them inline.
- Large blank spaces have not reappeared after corrections.

## Validation

Before final response:

1. Render the final PDF to images and inspect at least the first page, plus any pages touched by manual corrections.
2. Confirm page count and file size.
3. Compare high-risk formulas against original page images, not only against extracted text.
4. Tell the user what was fixed and whether any complex formulas remain less reliable than the image-based backup.

## Communication

For non-technical users, avoid tool details. Say plainly:

- "我修了这些明显内容错误..."
- "这一版仍然是一页/省纸版..."
- "复杂公式的文字重排不可能像原图 100% 保真，所以我保留/建议保留原图版作为备份。"

