This is taking longer than expected.

Try againBrowse the library
AI Blocks

All AI specialists

Hire an AI PDF layout designer

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.

What 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)

What 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

An example

Your app exports invoices, statements or resumes to PDF and the last page often comes out blank.

You ask: “Fix HTML to PDF layout for A4, Letter or custom pages. Use the material I attach and ask for anything essential that is missing.”

You get back:

  • Page geometry. Page size in mm, pt and px, margins, and the page style block to inject at load.
  • Print style rules. CSS to remove or swap so text and shapes stay sharp, such as blur and drop shadow.
  • Break and blank-page plan. Where pages may break and the small buffer that stops a blank last page.

An example, not your task.

Hire this specialist

It is free and needs no account. Download the pack, give it to your AI and tell it the job. Your AI asks for anything it is missing, then does the work and checks it.

Download the specialist

Related specialists

Skills and workflows for this job: Make documents, sheets and slides

Details

Everything it can hand back

Your task sets the actual outputs. The specialist picks the methods that cover them.

  • 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

How it does the job well

  • Keep sample numbers and code labelled as examples. Never present untested code as working.
  • Prepare changes and code. The user decides what goes into live systems.
  • Do not copy the profile's code word for word when the user's stack differs. Adapt it and say so.
  • Say plainly when you do not know. Do not invent library options or settings.
  • Read the existing code, its conventions and its tests before changing anything. Match the project's patterns.
  • Make the smallest change that fully solves the request. Keep unrelated refactors out.
  • Reproduce a bug before fixing it, and add a test that fails without the fix.

Mistakes it avoids

  • Claiming code works without running it or its tests.
  • Inventing APIs, package versions or settings instead of checking the installed ones.
  • Changing behaviour outside the request, such as reformatting whole files or renaming public interfaces.

What a good result looks like

An example, not your task: Your app exports invoices, statements or resumes to PDF and the last page often comes out blank.

  • Page geometry. Page size in mm, pt and px, margins, and the page style block to inject at load.
  • Print style rules. CSS to remove or swap so text and shapes stay sharp, such as blur and drop shadow.
  • Break and blank-page plan. Where pages may break and the small buffer that stops a blank last page.
  • Compile plan. How the PDF is saved in a reused headless browser, with font waiting and settings.
  • Accessibility and PDF/A. Steps to tag the PDF and save it as PDF/A, and the validator to confirm each.
  • Checks. Pass or fail tests for the finished PDF, each marked NOT RUN until you run it.

How the work is checked

  • The changed files build, and the relevant tests and linters pass. The commands and results are shown.
  • Each change is explained in one line with its reason, and risky areas are named.
  • Any check that could not run is reported as NOT_RUN with what it needs.
  • States which checks passed, failed or could not run, and names missing inputs.

These checks have not been run against a model yet. Your AI uses them to check its own work.

Capabilities

  • Fix the page size. It turns your paper size into mm, pt and px and sets margins, with the page size injected when the page loads.
  • Snapshot the page. It plans to print from a copy of the live page, so the PDF cannot drift from what users see on screen.
  • Keep text sharp. It lists blur and shadow effects that force pictures of text, and swaps in flat styles.
  • Guard the page edge. It adds a half-pixel height buffer and break rules so rounding cannot create a blank page.
  • Compile the PDF. It plans a reused headless browser that waits for fonts, then saves with tags and backgrounds on.
  • Check the file. It lists tests for selectable text, no text-as-picture and the PDF/A and accessibility steps, to run with a real validator.

How the role works

  1. Checks your task, context and available tools.
  2. Picks the methods needed and prepares a work plan.
  3. Carries out supported tasks, with each method's limits and review gates.
  4. Checks the real deliverables and corrects supported faults.
  5. Hands back files, evidence and unresolved gaps.

Your specialist's working setup

Download the base specialist without a task form or account. README.md and SETUP.md explain how to use the folder. SOUL.md defines its scope. INTAKE.md asks missing questions inside your AI. PLAYBOOK.md, SKILLS.md, BEST_PRACTICES.md, CHECKS.md and HANDOFF.md guide the work and its checked deliverables.

Complete associated skills, supporting files and licences are included. Choose only the methods needed for the actual task. Keep context, working files and accepted feedback in your AI project.

Use this specialist through MCP or the API

Call prepare_specialist with role_id engineering-pdf-engine-architect only. No task is required to load it. Your AI asks what job you need done, what you want back and which relevant context it can use.

For task-led hiring, call find_specialist, explain the suggested specialists and let the user accept or change the team.

Complete ZIP: Download base specialist. API: GET /api/v1/specialists/engineering-pdf-engine-architect/pack. The host AI supplies its own model, tools and execution; a pack does not connect accounts or run a task.

Inputs and helpful context

The specialist starts from the task brief. Only active methods require their inputs.

For the primary method, when used

  • 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)

Helpful context (optional)

  • A real PDF that shows the bug, opened next to the page on screen.
  • Your paper sizes and any rule that fixes them, such as a printer or form requirement.

Tools and access

  • Claude Code or another agent with access to your code: It can read your templates and CSS and point to the exact lines that cause blank pages or blurry text.
  • Claude, ChatGPT or Gemini in a chat: Good for the design and the plan. You paste code in and copy changes out yourself.

Functions and deliverables

  • PDF layout designer: 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.
    • 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
    Source: Michael Sitarzewski and Agency Agents contributors.
  • PDF maker and reader: Read a PDF or make a new one, then check every page as an image. Catch cut-off text and layout slips in your PDF before you send it.
    • The text pulled out of your PDF, as plain text, one block per page.
    • A PNG image of each page, named by page number, so you can see the layout.
    • A new PDF saved in output/pdf/ with a stable file name, if you asked for one.
    • A layout check after each change, with any problems named.
    Source: OpenAI.
  • Excel print layout fixer: Share a workbook and paper size. Get readable print settings and page checks.
    • print-ready.xlsx, a PDF review copy when a renderer is available, and print-checks.md.
    • A record of source files, changes and check results
    • Missing facts and any checks that could not run
  • Scanned PDF text reader: Give it PDFs, Office files, or scans. Get page-positioned text and OCR using local tools, with optional OCR services.
    • Text from every page you chose
    • The box position of each piece of text, in JSON
    • OCR text for scanned pages
    • Page images for charts or handwriting (optional)
    • A list of any pages that failed
    Source: K-Dense.
  • AI project context organiser: Share your project and next task. Get a short rules file, a focused file list and a clear handoff for later sessions.
    • A ready rules file for your project
    • A list of which files to load for each task
    • Rules for when to reset or trim the session
    • A checklist for spotting drifting answers
    Source: Addy Osmani.

Tasks you can use it for

  • 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.

Limits to check before starting

  • 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.

Best way to use this role

Give it one clear outcome, the actual files and a definition of done. Keep the work in one AI project so it can reuse checked context and earlier files.

  • 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/.

Read it as data

Read the complete role setup as JSON. Connect your AI to the AI Blocks MCP library and read aiblocks://roles/engineering-pdf-engine-architect for its role instructions and pinned sources.

This is a prepared AI role. No task has run. Your AI carries out authorized work using its available tools and reports the actual deliverables and checks.