name: minimax-pdf
description: HTML-first PDF production skill for reports, papers, and structured documents. Must be applied before generating PDF deliverables from HTML.
A. Scope and Operating Contract
This skill governs authoring and converting HTML into print-quality PDF.
Primary output goals:
Stable pagination and predictable layout on Linux runtime.
Searchable/selectable text (no screenshot-based fallback).
Professional, citation-safe long-form documents.
B. Hard Constraints (Do Not Violate)
B1. Conversion entrypoint
For HTML->PDF, use html_to_pdf only.
Forbidden:
Screenshot/print hacks or manual browser printing
Direct invocation of low-level local scripts for conversion
Reason: image-stitch paths degrade text quality and create pagination discontinuity.
B2. Rendering safety rules
Do not inject Paged.js manually. The runtime pipeline handles loading.
Do not rely on CSS counters (counter-reset, counter-increment, counter()).
Do not use runtime charting engines (ECharts, Chart.js, D3, Plotly, etc.).
Charts should be pre-rendered as static images and prefer landscape aspect ratio.
Decorative emoji/icon glyphs are disallowed unless explicitly requested.
After that, execute with explicit assumptions rather than repeatedly asking.
D. Content Governance
D1. Language policy
Chinese user query -> Chinese content
English user query -> English content
User-specified language -> obey exactly
D2. Outline policy
User provides outline -> preserve hierarchy/order, no silent restructuring
No outline -> choose structure by document type and keep narrative flow consistent
D3. Citation integrity
Never invent references.
Every citation must be verifiable (author/title/year/source).
Reused source should keep the same citation index.
Recommended citation style for this skill: IEEE numeric.
Sample reference list:
[1] R. Patel and L. Chen, "A comparative study on model routing," Journal of Applied AI, vol. 8, no. 3, pp. 44-58, 2025.
[2] M. Rivera, Systems Design Handbook, 2nd ed. New York, NY, USA: Northbridge Press, 2024.
[3] T. Huang, "Model evaluation checklist," Research Notes, https://example.org/eval (accessed Feb. 14, 2026).
E. Conversion Fidelity Checklist
When transforming existing material (translation/rewrite/reformat), preserve source fidelity:
E1. Links
Keep original destination URL in href.
Do not replace links with plain text.
Ensure conversion uses preserve_links=true.
E2. Images
Use a three-pass check:
1. Count extracted image assets
2. Count tags in HTML
3. Validate post-conversion image statistics
E3. Structure
Preserve source section sequence and anchor semantics.
Keep figure/table placement and numbering intent.
Do not add synthetic cover if source had none.
F. Implementation Blueprint
F1. Forbidden patterns
| Pattern | Why unstable | Replacement |
|---|---|---|
| CSS content counters for numbering | pagination DOM shifts can break numbering | explicit labels in markup |
| Dynamic JS chart libraries at render-time | print pagination conflicts | pre-rendered static charts |
| Emoji/icon-heavy typography | Linux fallback inconsistency | plain text labels |
Chart image policy:
Prefer landscape charts (width > height) to reduce page-break artifacts.