{
  "markdown": "# @mcp-z/mcp-pdf\n\nMCP server for creative PDF generation with full emoji, Unicode, and offline support\n\n## Common uses\n\n- Generate PDFs from text or layouts\n- Render PDF pages as images\n- Measure text before layout\n\n## Transports\n\nMCP supports stdio and HTTP.\n\n**Stdio**\n```json\n{\n  \"mcpServers\": {\n    \"pdf\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@mcp-z/mcp-pdf\"]\n    }\n  }\n}\n```\n\n**HTTP**\n```json\n{\n  \"mcpServers\": {\n    \"pdf\": {\n      \"type\": \"http\",\n      \"url\": \"http://localhost:9010/mcp\",\n      \"start\": {\n        \"command\": \"npx\",\n        \"args\": [\"-y\", \"@mcp-z/mcp-pdf\", \"--port=9010\"]\n      }\n    }\n  }\n}\n```\n\n`start` is an extension used by `npx @mcp-z/cli up` to launch HTTP servers for you.\n\n## Authentication\n\nNo OAuth or API keys required.\n\n## How to use\n\n```bash\n# List tools\nmcp-z inspect --servers pdf --tools\n\n# Create a simple PDF\nmcp-z call pdf pdf-document '{\"content\":[\"Hello from MCP\"]}'\n```\n\n## Available tools\n\n### pdf-resume\n\nGenerate professional resumes from JSON Resume format.\n\nParameters:\n\n- `filename` (string, optional) - Filename for the PDF (defaults to \"resume.pdf\")\n- `resume` (object, required) - JSON Resume schema\n- `sections` (object, optional) - Section ordering and field templates\n- `layout` (object, optional) - Spatial arrangement (single-column or two-column)\n- `styling` (object, optional) - Typography and spacing options\n- `font` (string, optional) - Custom font\n- `pageSize` (string, optional) - Page size (default: \"LETTER\")\n- `backgroundColor` (string, optional) - Page background color\n\nResume schema sections:\n\n- `basics` - Name, contact, summary, location\n- `work` - Work experience with highlights\n- `education` - Degrees and institutions\n- `projects` - Personal/professional projects\n- `skills` - Skills grouped by category\n- `awards`, `certificates`, `languages`, `volunteer`, `publications`, `interests`, `references`\n\n#### Section configuration\n\nControl which sections appear and in what order using `sections.sections`:\n\n```ts\nawait client.callTool('pdf-resume', {\n  resume: { /* JSON Resume data */ },\n  sections: {\n    sections: [\n      { source: 'basics', render: 'header' },\n      { source: 'basics.summary', title: 'Summary' },\n      { source: 'work', title: 'Experience' },\n      { source: 'skills', title: 'Skills' },\n      { source: 'education', title: 'Education' }\n    ]\n  }\n});\n```\n\nSection config properties:\n\n- `source` (string, required) - Path to data in resume schema (e.g., `basics`, `work`, `meta.customField`)\n- `render` (string, optional) - Built-in renderer. Use `header` explicitly or to force a renderer\n- `title` (string, optional) - Section heading (omit for no title)\n- `template` (string, optional) - LiquidJS template for custom rendering\n\nAvailable renderers:\n\n- `header` - Name + contact line from basics (never auto-inferred)\n- `entry-list` - Arrays with position/institution/organization\n- `keyword-list` - Arrays with `keywords`\n- `language-list` - Arrays with `language`\n- `credential-list` - Arrays with awarder/issuer/publisher\n- `reference-list` - Arrays with `reference`\n- `text` - String or string array\n\nExample: custom section order with meta fields\n\n```ts\nawait client.callTool('pdf-resume', {\n  resume: {\n    basics: { name: 'Jane Doe', email: 'jane@example.com' },\n    work: [{ /* ... */ }],\n    meta: { valueProp: 'Full-stack engineer with 10+ years experience...' }\n  },\n  sections: {\n    sections: [\n      { source: 'basics', render: 'header' },\n      { source: 'meta.valueProp', title: 'Value Proposition' },\n      { source: 'work', title: 'Experience' }\n    ]\n  }\n});\n```\n\n#### Field templates\n\nField templates use LiquidJS syntax to customize how fields are rendered.\n\nAvailable field templates:\n\n- `location` - `{{ city }}{% if region %}, {{ region }}{% endif %}`\n- `dateRange` - `{{ start | date: 'MMM YYYY' }} - {{ end | date: 'MMM YYYY' | default: 'Present' }}`\n- `degree` - `{{ studyType }}{% if area %}, {{ area }}{% endif %}`\n- `credential` - `{{ title | default: name }}{% if awarder %}, {{ awarder }}{% endif %}`\n- `language` - `{{ language }}{% if fluency %} ({{ fluency }}){% endif %}`\n- `skill` - `{{ name }}: {{ keywords | join: ', ' }}`\n- `contactLine` - `{{ items | join: ' | ' }}`\n\nDate format tokens:\n\n- `YYYY`, `YY`, `MMMM`, `MMM`, `MM`, `M`, `DD`, `D`\n\nAvailable filters:\n\n- `date` - Format a date string\n- `default` - Fallback for empty values\n- `tenure` - Calculate duration\n- `join` - Join array elements\n\nExample: French resume\n\n```ts\nawait client.callTool('pdf-resume', {\n  filename: 'cv-francais.pdf',\n  resume: { /* JSON Resume data */ },\n  sections: {\n    fieldTemplates: {\n      dateRange: \"{{ start | date: 'MM/YYYY' }} - {{ end | date: 'MM/YYYY' | default: 'Present' }}\",\n      location: '{{ city }}'\n    }\n  }\n});\n```\n\nExample: verbose date format\n\n```ts\nawait client.callTool('pdf-resume', {\n  filename: 'resume.pdf',\n  resume: { /* JSON Resume data */ },\n  sections: {\n    fieldTemplates: {\n      dateRange: \"{{ start | date: 'MMMM YYYY' }} to {{ end | date: 'MMMM YYYY' | default: 'Present' }}\"\n    }\n  }\n});\n```\n\n#### Two-column resume layout\n\n```ts\nawait client.callTool('pdf-resume', {\n  filename: 'two-column-resume.pdf',\n  resume: {\n    basics: {\n      name: 'Jane Doe',\n      label: 'Product Designer',\n      email: 'jane@example.com'\n    },\n    work: [{\n      name: 'Design Studio',\n      position: 'Lead Designer',\n      startDate: '2019-03',\n      highlights: ['Redesigned product UI', 'Increased conversion by 25%']\n    }],\n    skills: [\n      { name: 'Design', keywords: ['Figma', 'Sketch', 'Adobe XD'] },\n      { name: 'Frontend', keywords: ['HTML', 'CSS', 'React'] }\n    ],\n    languages: [\n      { language: 'English', fluency: 'Native' },\n      { language: 'Spanish', fluency: 'Intermediate' }\n    ]\n  },\n  layout: {\n    style: 'two-column',\n    gap: 30,\n    columns: {\n      left: { width: '30%', sections: ['skills', 'languages'] },\n      right: { width: '70%', sections: ['work'] }\n    }\n  }\n});\n```\n\nLayout options:\n\n- `style` - \"single-column\" (default) or \"two-column\"\n- `gap` - Space between columns in points (default: 30)\n- `columns.left.width` - Left column width (percentage or points)\n- `columns.left.sections` - Section source paths for left column\n- `columns.right.width` - Right column width\n- `columns.right.sections` - Section source paths for right column\n\n### pdf-layout\n\nCreate a PDF with precise positioning and Yoga flexbox layout.\n\nParameters:\n\n- `filename` (string, optional) - Filename for the PDF (defaults to \"document.pdf\")\n- `title` (string, optional) - Document metadata\n- `author` (string, optional) - Document metadata\n- `pageSetup` (object, optional) - Page configuration\n- `content` (array, required) - Content items\n- `layout` (object, optional) - Layout options\n\nPage setup:\n\n```ts\npageSetup: {\n  size: [612, 792],\n  margins: { top: 72, bottom: 72, left: 72, right: 72 },\n  backgroundColor: '#FFFFFF'\n}\n```\n\nContent types:\n\nText and headings:\n\n```ts\n{\n  type: 'text',\n  text: 'Content here',\n  fontSize: 12,\n  bold: true,\n  color: '#000000',\n  align: 'left',\n  x: 100,\n  y: 200,\n  oblique: 15,\n  characterSpacing: 1,\n  moveDown: 1,\n  underline: true,\n  strike: true\n}\n```\n\nShapes:\n\n```ts\n{ type: 'rect', x: 50, y: 50, width: 200, height: 100, fillColor: '#FF0000', strokeColor: '#000000', lineWidth: 2 }\n{ type: 'circle', x: 300, y: 400, radius: 50, fillColor: '#00FF00', strokeColor: '#000000', lineWidth: 1 }\n{ type: 'line', x1: 100, y1: 100, x2: 500, y2: 100, strokeColor: '#0000FF', lineWidth: 2 }\n```\n\nImages and pages:\n\n```ts\n{ type: 'image', imagePath: '/path/to/image.png', width: 200, height: 150, x: 100, y: 200 }\n{ type: 'pageBreak' }\n```\n\n#### Flexbox layout engine\n\nUse `type: 'group'` to create flexbox containers:\n\n```ts\n{\n  type: 'group',\n  direction: 'row',\n  gap: 20,\n  flex: 1,\n  justify: 'center',\n  alignItems: 'center',\n  align: 'center',\n  width: 300,\n  height: 200,\n  padding: 15,\n  background: '#f5f5f5',\n  border: { color: '#333', width: 1 },\n  children: [\n    { type: 'text', text: 'Child 1' },\n    { type: 'text', text: 'Child 2' }\n  ]\n}\n```\n\nCommon layout patterns:\n\nTwo equal columns:\n\n```ts\n{\n  type: 'group',\n  direction: 'row',\n  gap: 20,\n  children: [\n    { type: 'group', flex: 1, children: [{ type: 'text', text: 'Left' }] },\n    { type: 'group', flex: 1, children: [{ type: 'text', text: 'Right' }] }\n  ]\n}\n```\n\nThree columns with proportions (1:2:1):\n\n```ts\n{\n  type: 'group',\n  direction: 'row',\n  gap: 15,\n  children: [\n    { type: 'group', flex: 1, children: [/* ... */] },\n    { type: 'group', flex: 2, children: [/* ... */] },\n    { type: 'group', flex: 1, children: [/* ... */] }\n  ]\n}\n```\n\nCentered card:\n\n```ts\n{\n  type: 'group',\n  width: 300,\n  align: 'center',\n  border: { color: '#333', width: 2 },\n  padding: 20,\n  children: [\n    { type: 'heading', text: 'Card Title', align: 'center' },\n    { type: 'text', text: 'Card content here' }\n  ]\n}\n```\n\nSpace between items:\n\n```ts\n{\n  type: 'group',\n  direction: 'row',\n  justify: 'space-between',\n  children: [\n    { type: 'text', text: 'Left' },\n    { type: 'text', text: 'Right' }\n  ]\n}\n```\n\nMixed positioning:\n\n```ts\nawait client.callTool('pdf-layout', {\n  layout: { overflow: 'auto' },\n  content: [\n    { type: 'heading', text: 'TITLE', x: 54, y: 50 },\n    {\n      type: 'group',\n      direction: 'row',\n      gap: 20,\n      x: 54,\n      y: 100,\n      children: [\n        { type: 'group', flex: 1, children: [/* ... */] },\n        { type: 'group', flex: 1, children: [/* ... */] }\n      ]\n    },\n    { type: 'text', text: 'Footer', x: 54, y: 700 }\n  ]\n});\n```\n\nComplete flyer example:\n\n```ts\nawait client.callTool('pdf-layout', {\n  pageSetup: { backgroundColor: '#fffef5' },\n  content: [\n    { type: 'heading', text: 'SUMMER FESTIVAL 2024', align: 'center', fontSize: 28, y: 50 },\n    { type: 'text', text: 'July 15-17 | Central Park', align: 'center', y: 90 },\n    {\n      type: 'group',\n      direction: 'row',\n      gap: 20,\n      x: 54,\n      y: 130,\n      children: [\n        {\n          type: 'group',\n          flex: 1,\n          border: { color: '#2196f3', width: 2 },\n          padding: 15,\n          children: [\n            { type: 'heading', text: 'MUSIC', align: 'center', fontSize: 18 },\n            { type: 'text', text: 'Live bands all weekend' },\n            { type: 'text', text: '- Main Stage' },\n            { type: 'text', text: '- Acoustic Tent' }\n          ]\n        },\n        {\n          type: 'group',\n          flex: 1,\n          border: { color: '#4caf50', width: 2 },\n          padding: 15,\n          children: [\n            { type: 'heading', text: 'FOOD', align: 'center', fontSize: 18 },\n            { type: 'text', text: '50+ local vendors' },\n            { type: 'text', text: '- Food Court' },\n            { type: 'text', text: '- Craft Beers' }\n          ]\n        }\n      ]\n    },\n    {\n      type: 'group',\n      width: 300,\n      align: 'center',\n      y: 400,\n      border: { color: '#ff9800', width: 2 },\n      padding: 15,\n      background: '#fff8e1',\n      children: [\n        { type: 'heading', text: 'TICKETS', align: 'center', fontSize: 16 },\n        { type: 'text', text: 'Early Bird: $25', align: 'center' },\n        { type: 'text', text: 'At Door: $35', align: 'center' }\n      ]\n    }\n  ]\n});\n```\n\n#### Emoji and Unicode support\n\nColor emoji render as inline images. Unicode text is supported across major scripts.\n\n```json\n{\n  \"basics\": {\n    \"name\": \"John Doe\",\n    \"summary\": \"Developer passionate about clean code\"\n  }\n}\n```\n\n### pdf-document\n\nCreate a flowing PDF document with automatic pagination.\n\n### pdf-image\n\nRender PDF pages to PNG images for previews or export.\n\n### text-measure\n\nMeasure text width and height before layout.\n\n## Tools\n\n1. pdf-document\n2. pdf-image\n3. pdf-layout\n4. pdf-resume\n5. text-measure\n\n## External resources\n\nNone.\n\n## Prompts\n\n1. resource-fetching\n\n## Resources\n\n- PDFKit Documentation\n- JSON Resume Schema\n- JSON Resume Editor\n\n### Documentation\n\n[API Docs](https://mcp-z.github.io/mcp-pdf)\n",
  "bytes": 11989,
  "sha": "fc5ef215e5d6adac4ae8a5229177f91d973cfd538ae5ee63d4127a4b58e20c90",
  "repo_slug": "mcp-z/mcp-pdf",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_kmalakoff_mcp_pdf_b0788abc/readme"
}