๐ AI-Validated PDF Generator
Generate PDFs with automatic vision-based validation and CSS optimization. Powered by 3renderers.dev + OpenAI Vision
Single-Click PDF Generation with AI Validation
Enter your HTML and CSS, then click generate. The system will:
- Generate an initial PDF
- Analyze all pages with Vision AI
- Automatically fix any layout issues (up to 3 iterations)
- Return the validated PDF with detailed logs
About This MCP Server
This is an AI-powered Model Context Protocol (MCP) server that provides validated PDF generation.
How It Works:
- Initial Generation: Creates PDF from your HTML/CSS using WeasyPrint
- Vision Analysis: GPT-4 Vision analyzes each page for layout issues
- Automatic Fixing: AI suggests and applies CSS improvements
- Iteration: Repeats up to 3 times until all pages pass validation
- Final PDF: Returns validated PDF with detailed logs
What Gets Validated:
- โ Margin consistency and appropriateness
- โ Text readability (size, position, truncation)
- โ Image positioning and sizing
- โ Spacing between elements
- โ Logical page breaks
- โ Element alignment
- โ Content overflow issues
Requirements:
- OpenAI API key (set as
OPENAI_API_KEYenvironment variable) - Internet connection for 3renderers API
API Details:
- PDF Renderer: WeasyPrint via 3renderers.dev
- Vision AI: GPT-4 Vision (gpt-4o)
- Max Iterations: 3 attempts to fix issues
Rate Limits:
- 3renderers: 60 requests per minute
- OpenAI: Based on your API tier