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
- Preserve the source and write outputs to an
outputs/ folder. Use descriptive names such as ...省纸版.pdf, ...文字重排版.pdf, and ...校正版.pdf.
- 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.
- 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.
- 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.
- 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:
= =
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:
- Render the final PDF to images and inspect at least the first page, plus any pages touched by manual corrections.
- Confirm page count and file size.
- Compare high-risk formulas against original page images, not only against extracted text.
- 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% 保真,所以我保留/建议保留原图版作为备份。"
1---2name: exam-pdf-compact-reflow3description: 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.4---56# Exam PDF Compact Reflow78## Core Goal910Create a small, clear, paper-saving print version while preserving answers and formula meaning. Prefer a readable compact handout over a visually pretty page.1112## Workflow13141. Preserve the source and write outputs to an `outputs/` folder. Use descriptive names such as `...省纸版.pdf`, `...文字重排版.pdf`, and `...校正版.pdf`.152. Inspect the source format before editing:16 - For DOC/DOCX question banks, edit the document structure directly when possible.17 - For slide-exported PDFs, expect text order, superscripts, roots, fraction bars, and equation groups to be damaged by extraction.18 - If exact visual fidelity matters, make an image-based cropped/4-up backup first.193. 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.204. Reflow for print:21 - Use A4 landscape for dense math review sheets.22 - Use 3-4 columns, narrow margins, small but printable fonts, and short line heights.23 - Merge one-character or one-token vertical fragments into nearby text.24 - 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`.255. Keep answers inside the question flow when the user asks for integrated answers. Do not place a separate answer key unless requested.2627## Compact Font Defaults2829Use these defaults for short English/plain-text DOCX or PDF handouts after grammar/content cleanup:3031- 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`.32- 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.33- For 50% shrink output, keep paragraph gaps minimal, about `1-2pt`, and preserve readable paragraph indentation around `0.25cm`.34- Verify by rendering a PDF preview; the text should be visibly about half the previous 10pt version while remaining printable.3536## Formula Safety3738Never trust extracted PDF text alone for math. Render original pages as images and compare suspicious formulas visually.3940High-risk extraction errors:4142- Fraction bars become `= =` or disconnected numbers.43- Superscripts disappear: `π^2`, `R^3`, `x^2`, `e^2`.44- Radicals disappear: `√2`, `√x`, `√(x^2+y^2)`.45- Absolute values disappear: `|AB|=13`.46- Integral bounds detach from `∫`.47- Non-Latin glyphs appear from bad symbol extraction, such as `൜`, `න`, `อ`, replacement characters, or stray boxes.48- Final answers lose a denominator, e.g. `-1/4` becomes `- .`.4950When 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.5152## Content Audit Checklist5354After generating a compact text version, search the extracted output for:5556```text57= =58R= =5911360� □ ?61൜ න อ62α=63|AB|64π^265R^366√67```6869Then manually check:7071- Corrected source mistakes remain corrected, for example the vector dot-product example in this run was `-39`, not the source's wrong `-113`.72- All final answers with powers keep their powers: `e^2`, `-6π^2`, `8πR^3`.73- Short final answers are not truncated: `π/4`, `√2`, `-1/4`, `15π/8`.74- Line/normal equations are not left as broken stacked fragments; rewrite them inline.75- Large blank spaces have not reappeared after corrections.7677## Validation7879Before final response:80811. Render the final PDF to images and inspect at least the first page, plus any pages touched by manual corrections.822. Confirm page count and file size.833. Compare high-risk formulas against original page images, not only against extracted text.844. Tell the user what was fixed and whether any complex formulas remain less reliable than the image-based backup.8586## Communication8788For non-technical users, avoid tool details. Say plainly:8990- "我修了这些明显内容错误..."91- "这一版仍然是一页/省纸版..."92- "复杂公式的文字重排不可能像原图 100% 保真,所以我保留/建议保留原图版作为备份。"