{
 "schema": "aiblocks-page/1",
 "id": "agency-engineering-pdf-engine-architect",
 "type": "agent",
 "name": "PDF layout designer",
 "summary": "Fix HTML to PDF layout for A4, Letter or custom pages. Get print CSS, page-break rules and checks that catch blank pages and blurry text.",
 "headline": "PDF layout designer",
 "subhead": "Tell it the document you print and the page size. It plans the page size, margins and print styles, then the checks that catch blank pages and blurry text. Built for developers who turn web pages into PDFs.",
 "job": {
  "id": "work-with-files",
  "name": "Make documents, sheets and slides"
 },
 "level": "intermediate",
 "thinking": "high",
 "tested": true,
 "updated": "2026-11-03",
 "first_published": "2026-10-26",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  },
  {
   "type": "codebase",
   "required": false,
   "label": "Codebase",
   "what": "a project's code, in a folder or repo the AI can open"
  }
 ],
 "outputs": [
  {
   "type": "plan",
   "required": true,
   "label": "Plan",
   "what": "a dated plan: what to do, in what order, with a decision rule for each step"
  },
  {
   "type": "audit_report",
   "required": true,
   "label": "Audit report",
   "what": "findings with evidence, severity, missing inputs and next actions"
  }
 ],
 "you_give": [
  "What the document is and who reads or prints it, such as an invoice or a resume",
  "The page size or sizes, such as A4, US Letter or a custom width and height",
  "How your code makes the PDF today, such as React with Puppeteer (optional)",
  "The bug, plus a snippet of the page HTML and CSS if you have it (optional)",
  "Must-haves such as a tagged PDF, PDF/A or how many PDFs you make per minute (optional)"
 ],
 "you_get": [
  "The page size in mm, pt and px, with margins and the page style block to inject",
  "A list of CSS in your page that forces blurry pictures, each with a safe swap",
  "A plan for page breaks, fonts and blank-page protection",
  "A plan to make the PDF in a reused headless browser, with code to adapt",
  "Pass or fail checks to run on the finished PDF, and the guesses you must confirm"
 ],
 "use_when": [
  "Your app exports invoices, statements or resumes to PDF and the last page often comes out blank.",
  "Text or logos in your PDF look blurry because a shadow or blur effect turned them into pictures.",
  "One page must print on A4, US Letter and a custom size without breaking.",
  "You need tagged PDFs for accessibility and want a plan to check them."
 ],
 "skip_when": [
  "You want to make one PDF from text or a sheet and have no code. Use the PDF maker and reader or the JSON document file generator.",
  "You want to read, merge, split or fill PDFs you already have. Use the PDF file editor.",
  "You need a Word, slide or Excel file. Use the Document generation planner.",
  "You want an Excel sheet to print well. Use the Excel print layout fixer.",
  "You need a designer to judge how the page looks or a print proof. Ask a person."
 ],
 "output_sample": {
  "input": [
   "The document and who prints it, such as an invoice",
   "The page size, such as A4 or US Letter",
   "How you make the PDF today, and the bug (optional)",
   "A snippet of your page HTML and CSS (optional)"
  ],
  "prerequisites": [
   "A developer who can run code and test a PDF",
   "Claude, ChatGPT or Gemini, or an agent such as Claude Code that can read your code"
  ],
  "output": [
   {
    "name": "Page geometry",
    "contains": "Page size in mm, pt and px, margins, and the page style block to inject at load."
   },
   {
    "name": "Print style rules",
    "contains": "CSS to remove or swap so text and shapes stay sharp, such as blur and drop shadow."
   },
   {
    "name": "Break and blank-page plan",
    "contains": "Where pages may break and the small buffer that stops a blank last page."
   },
   {
    "name": "Compile plan",
    "contains": "How the PDF is saved in a reused headless browser, with font waiting and settings."
   },
   {
    "name": "Accessibility and PDF/A",
    "contains": "Steps to tag the PDF and save it as PDF/A, and the validator to confirm each."
   },
   {
    "name": "Checks",
    "contains": "Pass or fail tests for the finished PDF, each marked NOT RUN until you run it."
   },
   {
    "name": "Open assumptions",
    "contains": "What the AI guessed and what you must confirm."
   }
  ]
 },
 "output_shape": "PAGE GEOMETRY\n  Size: <name> | <mm> | <pt> | <px at 96 DPI>\n  Margins: <top> <right> <bottom> <left>\n  Page style block: <code to inject at load>\n\nPRINT STYLE RULES\n  <rule> | <why it keeps text sharp> | <what to remove or swap>\n\nBREAK AND BLANK-PAGE PLAN\n  <element> | <break rule> | <buffer or fix>\n\nCOMPILE PLAN\n  <step> | <setting or code> | <who runs it>\n\nACCESSIBILITY AND PDF/A\n  <step> | <tool to confirm it>\n\nCHECKS\n  <check> | <how to run it> | <pass or fail, or NOT RUN>\n\nOPEN ASSUMPTIONS\n  <guess> | <what to confirm>",
 "how_to_use": [
  "Download the pack from this page and add it to your AI as a skill. If you cannot, paste SKILL.md into a new chat, then paste references/source-agent.md after it.",
  "Say what the document is, the page size and what goes wrong. Paste the page HTML and CSS if you can.",
  "Type \"Design the PDF layout for this page\" or \"Find what causes the blank last page\".",
  "Read the checks list first. Run each check on a real PDF from your own code. The AI cannot render one for you.",
  "Ask a developer to review any code before it goes near live systems. For a Claude Code agent, copy references/source-agent.md into .claude/agents/."
 ],
 "checks": [
  "The result addresses your actual task and cites the evidence used.",
  "Examples, role-play experience and targets are kept separate from verified results.",
  "Claims of tests, memory, tool access or completed actions match what actually happened."
 ],
 "next": [
  {
   "name": "PDF maker and reader",
   "url": "https://useaiblocks.com/skills/pdf-maker-and-reader",
   "why": "PDF maker and reader"
  },
  {
   "name": "JSON document file generator",
   "url": "https://useaiblocks.com/skills/document-file-generator",
   "why": "JSON document file generator"
  }
 ],
 "source": {
  "by": "Michael Sitarzewski and Agency Agents contributors",
  "repo": "msitarzewski/agency-agents",
  "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/engineering/engineering-pdf-engine-architect.md",
  "licence": "MIT",
  "original_name": "PDF Engine Architect",
  "commit": "b37b5bb33b78f2c1d6567d98e25ca818e3259219"
 },
 "credits": [
  {
   "title": "PDF Engine Architect",
   "by": "Michael Sitarzewski and Agency Agents contributors",
   "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/engineering/engineering-pdf-engine-architect.md",
   "used": "Original agent profile, preserved in references/source-agent.md; AI Blocks adds setup and review instructions."
  }
 ],
 "files": [
  "LICENSE",
  "references/source-agent.md",
  "SETUP.md",
  "source.json"
 ],
 "links": {
  "page": "https://useaiblocks.com/agents/agency-engineering-pdf-engine-architect",
  "markdown": "https://useaiblocks.com/agents/agency-engineering-pdf-engine-architect.md",
  "json": "https://useaiblocks.com/agents/agency-engineering-pdf-engine-architect.json",
  "instructions": "https://useaiblocks.com/skills/agency-engineering-pdf-engine-architect/SKILL.md",
  "download": "https://useaiblocks.com/skills/agency-engineering-pdf-engine-architect.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/agency-engineering-pdf-engine-architect",
  "api_document": "https://useaiblocks.com/api/v1/documents/agent/agency-engineering-pdf-engine-architect",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
