/** * MCP server wiring: registers the four pdfnative tools on a low-level * `Server` instance and exposes a `createServer()` factory so the runtime * (CLI, tests, embedded host) can choose how to connect a transport. */ import { Server } from '@modelcontextprotocol/sdk/server/index.js'; export declare function createServer(): Server; /** * Initialise pdfnative's Node-zlib compression backend and async crypto subsystem * exactly once. Safe to call multiple times — the underlying calls are idempotent * and the promise is memoised. (`initCrypto` is required since pdfnative v1.1 for * any code path that uses ASN.1 / RSA / ECDSA primitives.) */ export declare function ensureCompressionReady(): Promise; export declare const __serverMetadata: { readonly name: "pdfnative-mcp"; readonly version: "1.0.0"; }; export declare const __serverInstructions = "pdfnative-mcp bridges the zero-dependency 'pdfnative' v1.2 library to MCP. API version: 1.0.0 (stable).\n\nDECISION TREE \u2014 pick the right tool in one step:\n \u2022 Plain document (headings, paragraphs, lists) \u2192 generate_basic_pdf\n \u2022 QR code / barcode (URL, SKU, EAN) \u2192 add_barcode\n \u2022 Non-Latin script (Arabic, Hindi, Chinese, Japanese\u2026) \u2192 add_international_text\n \u2022 Tabular / report data \u2192 add_table\n \u2022 Interactive form (text fields, checkboxes, dropdowns) \u2192 add_form\n \u2022 Embed a JPEG/PNG into a PDF \u2192 embed_image\n \u2022 Sign any PDF (auto-injects placeholder) \u2192 sign_pdf\n \u2022 Customize signature placeholder before signing \u2192 prepare_signature_placeholder \u2192 sign_pdf\n \u2022 Factur-X / ZUGFeRD invoice or any PDF with attachments \u2192 add_attachment (NOT generate_basic_pdf)\n \u2022 Inspect / assert PDF metadata in CI \u2192 inspect_pdf\n \u2022 Verify all PAdES signatures \u2192 verify_pdf\n \u2022 Pull plain text from a PDF \u2192 extract_text\n\nCOMMON PITFALLS (read these to avoid retry loops):\n \u2022 Barcode 'data' is the RAW payload \u2014 do NOT URL-encode URLs. For a QR pointing to https://google.com just pass data: 'https://google.com'.\n \u2022 Barcode 'ecLevel' (L|M|Q|H) applies ONLY to format='qr' and is ignored elsewhere. Use 'H' for printed media.\n \u2022 EAN-13 'data' must be exactly 12 or 13 digits (the 13th check digit is auto-computed if you pass 12).\n \u2022 sign_pdf accepts ONLY DER-encoded inputs in base64. Convert from PEM with: openssl pkey -in key.pem -outform DER | base64 -w0 (and openssl x509 -in cert.pem -outform DER | base64 -w0 for the cert).\n \u2022 sign_pdf RSA key must be PKCS#1 DER (field 'rsaKeyPkcs1DerBase64'). ECDSA key may be SEC1 or PKCS#8 DER (field 'ecPrivateKeyDerBase64') or the raw 32-byte scalar as 64 hex chars (field 'ecPrivateScalarHex').\n \u2022 sign_pdf auto-injects a placeholder when missing \u2014 call it directly on ANY PDF unless you specifically need to customize the placeholder.\n \u2022 For Factur-X / ZUGFeRD invoices, use add_attachment (PDF/A-3) \u2014 generate_basic_pdf cannot embed files.\n \u2022 PDF/A: pass pdfA='pdfa2b' for the widest reader compatibility. PDF/A-3 is required when you have attachments.\n \u2022 outputMode='file' is only available when the host sets PDFNATIVE_MCP_OUTPUT_DIR; otherwise PDFs are returned as base64.\n\nEvery tool ships JSON-Schema-typed inputs/outputs, _meta.apiVersion = '1.0.0', and worked-example _meta.examples. See docs/AI_GUIDE.md for a longer walk-through."; //# sourceMappingURL=server.d.ts.map