--- name: output-pdf-export-style description: Use when Claude or a downstream tool must render a legal document to PDF — whether from Markdown, DOCX, or a direct generation pipeline. Covers generation path, style requirements, security options, accessibility, and the specific rules for court-filing-grade PDF/A. Triggers on any document generation task where the final deliverable is a PDF file. license: MIT metadata: id: output.pdf-export-style category: output intent: ["__format__", "pdf", "export", "filing", "document"] related: - output-markdown-legal-doc - output-partner-memo-style - output-source-attribution-block priority: P1 source: Louis — HAQQ Legal AI (github.com/sboghossian/mini-claude-for-legal) version: "1.0" --- # PDF Export Style PDF is the final delivery format for the vast majority of legal documents — client advice letters, executed contracts, court filings, regulatory submissions, and internal policies. A poorly rendered PDF is professionally damaging: missing fonts, split clauses, invisible signatures, and failed court-filing validations are all real risks. This skill governs how Claude directs the PDF generation pipeline and what quality checks must pass before a PDF is treated as final. ## When to use this Activate whenever: - A document generated by Claude must be exported as a PDF deliverable - A user uploads or references a PDF and asks about rendering or re-generation - A court filing, regulatory submission, or signed-contract PDF is being prepared - Security controls (watermarking, passwords, copy restrictions) are requested ## Generation path The recommended conversion pipeline depends on available tools: | Path | Use case | Notes | |---|---|---| | Markdown → DOCX → PDF | Standard legal docs, opinions, memos | Most reliable for typography control; use Pandoc for Markdown → DOCX, then Word or LibreOffice for DOCX → PDF | | Markdown → PDF (headless) | Automated pipelines, no DOCX step | Puppeteer/wkhtmltopdf with a legal-grade CSS; watch for page-break issues | | DOCX → PDF | Existing Word documents | Word native save-as-PDF is the gold standard for fidelity | | LaTeX → PDF | Complex court submissions, academic filings | Best for precise layout control; steep learning curve | **Critical:** Always test-render before treating the PDF as final. Auto-formatting issues — clauses split across pages, signature blocks detached from their lead-in text, missing fonts — are common and require manual adjustment. ## Style requirements ### Typography - Embed all fonts in the PDF. Do not rely on system fonts being present on the reader's device. - Standard legal fonts: Times New Roman 12pt (body), Arial 11pt (body), Calibri 11pt (body). All are safe for PDF embedding. - Line spacing: 1.5 for most legal documents; double-spaced for US court submissions unless the court specifies otherwise. - Margins: 2.5 cm (1 inch) on all sides as a minimum for court documents; adjust for letterhead templates. ### Pagination - Page numbers: bottom centre or bottom right, format `Page X of Y`. - Keep headers/footers consistent: document title or matter reference on the header; page number on the footer. - Control page breaks: prevent clauses from splitting mid-sentence; keep signature blocks on the same page as their lead-in. - For multi-part documents with schedules, consider continuous page numbering or reset per schedule depending on firm convention. ### Metadata Embed the following PDF metadata (visible in File > Properties): - **Title**: the document title - **Author**: the firm or in-house legal team name (not the AI tool) - **Subject**: matter reference or subject line - **Keywords**: practice area, jurisdiction, document type ### Hyperlinks Preserve internal and external hyperlinks: - Cross-references within the document (e.g., "as set forth in Section 4.2") should hyperlink to the target section - Statute references may hyperlink to the official legislative database (UAE MoJ, Najiz, etc.) - Note: some courts strip or reject hyperlinked PDFs — disable hyperlinks for court filings if the court's rules so require. ## Security options Apply based on the document's sensitivity level: | Option | When to use | |---|---| | Password (open) | Highly confidential documents shared by email | | Password (modify) | Final signed documents — prevent editing | | Copy restriction | Expert reports, due diligence materials | | Print restriction | Draft documents for review only | | Digital signature | Executed contracts, notarised documents | **Note:** PDF password protection is not a substitute for proper document management and access controls. It adds friction, not genuine security. ## Digital signatures For documents requiring valid electronic signatures: - Use PDF signature fields compliant with the applicable e-signature law (UAE Federal Law on Electronic Transactions and Trust Services; KSA Electronic Transactions Law; EU eIDAS Regulation for EU-governed contracts). - A qualified electronic signature (QES) under eIDAS provides the highest legal weight for EU and UK documents. - For notarised MENA documents: some jurisdictions (e.g., UAE Tawtheeq, KSA Tawthiq) require in-person notarisation or certified electronic notarisation — a digitally signed PDF alone may not suffice. ## Accessibility Legal AI outputs may be reviewed on assistive technology. Minimum standards: - Tag headings (H1, H2, H3) in the PDF tag tree for screen-reader navigation - Provide alt text for any diagrams, charts, or images embedded in the document - Ensure reading order in the tag tree matches the visual reading order - Do not use scanned-image PDFs for searchable content — OCR or generate from source ## Confidentiality watermark For drafts and non-final documents: - Apply a diagonal, semi-transparent watermark: **DRAFT — CONFIDENTIAL — NOT FOR CIRCULATION** - Remove the watermark before sending a final executed version - For privileged documents: **PRIVILEGED & CONFIDENTIAL — ATTORNEY-CLIENT COMMUNICATION** - Position: diagonal, centre of page, ~30% opacity, grey or light-red ## Bates numbering For litigation document production: - Apply sequential Bates numbers: `[PartyPrefix]-[7-digit sequential number]` e.g., `ACME-0000001` - Position: bottom right corner - Apply consistently across all documents in a production set - Maintain a Bates log correlating numbers to original document references ## Court-filing-grade PDF (PDF/A) When filing with a court or regulatory authority that requires archival format: - **Format**: PDF/A-1b or PDF/A-2b (ISO 19005) — embeds all fonts, prohibits external content references, ensures long-term readability - **No encryption**: PDF/A prohibits password protection - **No hyperlinks to external URLs**: strip external hyperlinks - **No audio/video** embedded content - **Specific court rules**: courts in DIFC, ADGM, and various UAE mainland courts have specific filing requirements (page size, font, margin, line spacing) — always verify the court's Practice Direction before filing - **Validation**: validate the PDF/A compliance with a tool such as Adobe Acrobat preflight or VeraPDF before filing - **Checklist before filing**: - [ ] PDF/A compliance validated - [ ] All fonts embedded - [ ] No external hyperlinks - [ ] Page numbering correct - [ ] Signature pages complete - [ ] File size within court's limit (if any) - [ ] File named per court's naming convention ## Common rendering failures | Problem | Cause | Fix | |---|---|---| | Missing font substitution | Font not embedded | Embed all fonts at generation time | | Signature block on new page alone | No keep-with-previous | Set keep-with-previous on the last body line | | Clause split mid-sentence | No orphan/widow control | Enable orphan/widow control in the template | | Hyperlinks broken | Relative paths | Use absolute URLs only | | Watermark on final version | Forgot to remove | Use a separate "final" template without watermark | | Scanned image not searchable | OCR not applied | Always generate from source; apply OCR if scanning originals | ## Related skills - [[output-markdown-legal-doc]] - [[output-partner-memo-style]] - [[output-source-attribution-block]] - [[output-inline-citations-with-pinpoints]]