{"slug":"make-pdf","title":"make-pdf","summary":"Generate finished PDFs from Markdown or HTML via the Nutrient DWS Build API - single files or whole directories - with compliance-grade output options (accessible PDF/UA, archival PDF/A, text watermarks) and built-in conformance verification. Use when the user asks to make, gener","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-11-29T00:42:57.580039Z","repo":{"url":"https://github.com/PSPDFKit-labs/nutrient-skills","stars":18,"forks":1,"license":null,"updatedAt":"2026-11-26T02:45:46Z"},"bodyHtml":"<hr>\n<h2>name: make-pdf\ndescription: Generate finished PDFs from Markdown or HTML via the Nutrient DWS Build API - single files or whole directories - with compliance-grade output options (accessible PDF/UA, archival PDF/A, text watermarks) and built-in conformance verification. Use when the user asks to make, generate, export, or batch-convert PDFs from Markdown, HTML, notes, or reports, especially when PDFs must be accessible (PDF/UA, WCAG/ADA/EAA), archival (PDF/A), or watermarked, or to check PDF/A markers on an existing PDF. For accessibility or PDF/UA-1 checks on an existing PDF, use remediate-pdf. For signing, redaction, OCR, or merging, use document-processor-api.</h2>\n<h1>Nutrient Make PDF</h1>\n<p>Turn a Markdown or HTML file into a finished PDF through the Nutrient DWS Build API. The differentiator over local <code>chromium --print-to-pdf</code> or Pandoc is the output stage: the same call can emit <strong>tagged, accessible PDF/UA</strong> or <strong>archival PDF/A</strong>, and stamp a diagonal text watermark — compliance work a plain HTML-to-PDF pipeline cannot do.</p>\n<h2>Quick Start</h2>\n<p>All paths below are relative to this skill's directory (the directory containing <code>scripts/</code> and <code>assets/</code>).</p>\n<ol>\n<li>Export the API key before generating (not needed for <code>--html-only</code> or the smoke test):\n<ul>\n<li><code>export NUTRIENT_API_KEY=\"nutr_sk_...\"</code> (the same variable the sibling <code>document-processor-api</code> scripts use; <code>NUTRIENT_DWS_API_KEY</code> is accepted as a fallback)</li>\n</ul>\n</li>\n<li>Generate:</li>\n</ol>\n<pre><code>uv run scripts/make-pdf.py --input report.md --out report.pdf\n</code></pre>\n<p>The <code>markdown-it-py</code> and <code>nutrient-dws</code> packages are fetched automatically on first use.</p>\n<h2>Common Tasks</h2>\n<ul>\n<li>Standard PDF from Markdown: <code>uv run scripts/make-pdf.py --input notes.md --out notes.pdf</code></li>\n<li>Accessible PDF/UA (tagged, for WCAG/ADA/EAA requirements): add <code>--accessible</code></li>\n<li>Archival PDF/A: add <code>--pdfa</code> (conformance via <code>--pdfa-level</code>, one of <code>pdfa-1a/1b/2a/2b/2u/3a/3u</code>, default <code>pdfa-2b</code>; only valid together with <code>--pdfa</code>)</li>\n<li>Draft watermark: add <code>--watermark DRAFT</code></li>\n<li>Memo layout instead of the default document layout: <code>--template memo</code></li>\n<li>Dark theme: <code>--theme dark</code></li>\n<li>Title-page metadata: <code>--title</code>, <code>--subtitle</code>, <code>--author</code>, <code>--date</code> (or set them in Markdown frontmatter; CLI flags win)</li>\n<li>Inspect the rendered HTML without calling the API (offline, no key): <code>--html-only</code> (Markdown input only — errors on <code>.html</code> input, which already is the HTML)</li>\n<li>Debug layout alongside the PDF: <code>--output-html</code> writes the intermediate HTML next to the PDF</li>\n<li>Batch: point <code>--input</code> at a directory (with <code>--out &lt;dir&gt;</code>, required) to convert every <code>.md</code>/<code>.html</code> in it — see Batch Conversion below</li>\n</ul>\n<p><code>--accessible</code> and <code>--pdfa</code> are mutually exclusive (one output type per build). Check exact arguments with <code>uv run scripts/make-pdf.py --help</code>.</p>\n<h2>Input Rules</h2>\n<ul>\n<li><code>.md</code> input is converted to HTML with a CommonMark+GFM parser (tables, strikethrough, task lists), then wrapped in the selected template with the theme CSS inlined — one self-contained HTML file is uploaded.</li>\n<li><code>.html</code> input is uploaded as-is; template, theme, and metadata flags do not apply and a warning names any that were passed. Use it when you already have styled HTML.</li>\n<li>YAML frontmatter in Markdown (<code>title</code>, <code>subtitle</code>, <code>author</code>, <code>date</code>, <code>template</code>, <code>theme</code>) controls the cover block; CLI flags override frontmatter. When no title is given anywhere, the first <code>#</code> heading (or the filename) becomes the document title, so accessible output always has a real title.</li>\n<li>External images require network fetches on the DWS side and referenced local images are not uploaded in v1 — embed images as <code>data:</code> URIs if they must appear.</li>\n</ul>\n<h2>Verification (built in)</h2>\n<p>Compliance outputs are verified, not just labeled. With <code>--accessible</code> or <code>--pdfa</code>, the generated PDF is automatically checked after the build (<code>--no-verify</code> opts out); exit code 3 means \"generated but failed verification\" — the PDF is kept on disk so you can inspect it. If the verifier itself cannot run, the build still exits 3 rather than silently passing; <code>--no-verify</code> is the explicit way to accept unverified output. Passing <code>--verify</code> without a compliance flag is rejected up front — a standard PDF has no conformance claim to check.</p>\n<p>Two assurance levels, and be honest about which one ran:</p>\n<ul>\n<li><strong>Structural checks</strong> (always available, via <code>scripts/verify-pdf.py</code>): the PDF/UA-1 claim marker (<code>pdfuaid</code> XMP part 1 — PDF/UA-2 documents are out of scope), tagged-structure signals (<code>MarkInfo</code>, <code>StructTreeRoot</code>), language, <code>DisplayDocTitle</code>, and a non-empty document title — or the PDF/A identification (<code>pdfaid</code> part + conformance, matched against the requested level). These catch real failures but are <strong>not a full conformance audit</strong>.</li>\n<li><strong>Full audit</strong> (optional): if <code>verapdf</code> is installed on PATH, the verifier also runs veraPDF for a genuine conformance validation and reports its verdict. Recommend installing veraPDF when the user's requirement is regulatory (ADA/EAA deadlines, records retention).</li>\n</ul>\n<p>Use the standalone verifier for an existing PDF/A file. For a PDF/UA-1 check on an existing PDF,\nuse <code>remediate-pdf</code>'s <code>validate.py</code>. That skill also bundles <code>verify-pdf.py</code> for offline inspection.</p>\n<pre><code>uv run scripts/verify-pdf.py --input archive-dir/ --profile pdfa --pdfa-level pdfa-2b\n</code></pre>\n<h2>Batch Conversion</h2>\n<p><code>--input &lt;directory&gt;</code> converts every <code>.md</code>, <code>.markdown</code>, <code>.html</code>, and <code>.htm</code> file directly in that directory (non-recursive), up to 4 concurrently:</p>\n<pre><code>uv run scripts/make-pdf.py --input reports/ --out pdfs/ --accessible\n</code></pre>\n<ul>\n<li><code>--out &lt;dir&gt;</code> is required for directory input; outputs are named <code>&lt;stem&gt;.pdf</code>.</li>\n<li>Per-document metadata comes from each file's frontmatter, first <code>#</code> heading, or filename — global <code>--title</code>/<code>--subtitle</code> are rejected for directory input. Shared flags (<code>--template</code>, <code>--theme</code>, <code>--author</code>, <code>--date</code>, <code>--watermark</code>, compliance and verify flags) apply to every file.</li>\n<li>Failures don't stop the batch: a summary on stderr lists converted/verified/failed counts, stdout still prints only created file paths. Exit 0 = all good, 1 = at least one build failed, 3 = builds succeeded but at least one verification failed.</li>\n<li>Batch mode never overwrites existing outputs (and refuses inputs that would collide on the same output name) — point <code>--out</code> at a fresh directory or remove stale files when regenerating.</li>\n</ul>\n<h2>Layout Honesty (Chromium limits)</h2>\n<p>DWS renders HTML with headless Chromium (<code>printToPDF</code>). That means standard print CSS works (<code>@page</code> size and margins, <code>page-break-*</code>/<code>break-*</code> rules, <code>@media print</code>), but CSS Paged Media features Chromium does not implement will silently not render: <code>position: running()</code> running headers/footers, <code>counter(page)</code>, and <code>target-counter()</code> TOC page numbers. Do not promise page-numbered TOCs or running headers from CSS. If the user needs those, say so and offer the trade-offs (front-matter TOC without page numbers, or a different toolchain).</p>\n<h2>Chaining Other Document Operations</h2>\n<p>Generation is one step. Related operations live in sibling plugins from the same marketplace:</p>\n<ul>\n<li>Sign, redact, or merge the produced PDF: the <code>document-processor-api</code> skill — <code>/plugin install nutrient-dws@nutrient-skills</code>. Its scripts read the same <code>NUTRIENT_API_KEY</code>; run them from that skill's own directory, e.g. <code>uv run scripts/sign.py --input report.pdf --out report-signed.pdf</code>.</li>\n<li>Check or improve the accessibility of an existing PDF with the <code>remediate-pdf</code> skill\n(<code>/plugin install remediate-pdf@nutrient-skills</code>).</li>\n</ul>\n<h2>Implementation Rules</h2>\n<ul>\n<li>Fail fast with a clear message when <code>NUTRIENT_API_KEY</code> (or the <code>NUTRIENT_DWS_API_KEY</code> fallback) is missing (unless <code>--html-only</code>).</li>\n<li>Never log the API key or request headers.</li>\n<li>Write outputs to explicit paths and print each created file path (one path per line on stdout; progress on stderr). A debug HTML path prints as soon as the file exists, even if a later build step fails.</li>\n<li>Non-zero exit on any failure; do not claim success unless the output file exists and is non-empty.</li>\n</ul>\n<h2>Validation</h2>\n<p>Before calling this skill done after changes:</p>\n<ul>\n<li><code>uv run scripts/smoke-test.py</code> — offline (no network, no key): every template x theme combination, Markdown feature survival (headings, tables, code blocks), verifier checks against constructed fixtures, and batch discovery.</li>\n<li>Generate one real PDF if a key is available; for compliance outputs let the built-in verification run (or run <code>verify-pdf.py</code> explicitly) rather than only checking the file is non-empty.</li>\n</ul>\n","files":[{"path":"assets/sample/sample.md","sizeBytes":1211,"isText":true},{"path":"assets/templates/document.html","sizeBytes":429,"isText":false},{"path":"assets/templates/memo.html","sizeBytes":482,"isText":false},{"path":"assets/themes/dark.css","sizeBytes":2234,"isText":false},{"path":"assets/themes/light.css","sizeBytes":2235,"isText":false},{"path":"scripts/make-pdf.py","sizeBytes":23180,"isText":true},{"path":"scripts/smoke-test.py","sizeBytes":11994,"isText":true},{"path":"scripts/verify-pdf.py","sizeBytes":14846,"isText":true},{"path":"SKILL.md","sizeBytes":8455,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"notes-only","suspicious":0,"notes":2,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-29T00:45:10.023751Z","sha256":"C8D5867AAD5DEF5DE7C8205BBF3D4E2C0A29538EB25FB47226EBA49BCDEB320B","sizeBytes":21132},"review":null,"source":{"repositoryUrl":"https://github.com/PSPDFKit-labs/nutrient-skills","path":"plugins/make-pdf/skills/make-pdf","license":null,"commit":"83aea52a003a4ebb69fcf78ea724b48cbe950835","subtreeSha":"3FB5FBE01F53746D642C138E8047E513A9904C82F299DEF142500F40F32BC12E","lastSyncedAt":"2026-11-29T00:42:56.729498Z"},"reviewedAt":"2026-11-29T00:50:35.967778Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/PSPDFKit-labs/nutrient-skills/tree/main/plugins/make-pdf/skills/make-pdf"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install pspdfkit-labs-nutrient-skills@llmmart"},{"target":"git","command":"git clone https://github.com/PSPDFKit-labs/nutrient-skills.git"}]}