🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)
🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)

🔧 Programmierung 🕛 kürzlich 3 Min Lesezeit
0

From fragile iframes to server-side PDFs: a rendering migration story with Playwright

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

By Mohamed Amine Ben Mallessa — Lead Dev at Sollea AI









The technical context



The application we shipped generates customized posters from a simple web form. Users fill in their event details (dates, venue, times) and the app produces a print-ready document.



Tech stack: Next.js 15 (App Router, TypeScript, TanStack Query) + FastAPI (SQLAlchemy 2, PostgreSQL). Modern stack — but document rendering was the weak link.






The trap of "free" solutions



When we started, Photopea looked ideal: a free Photoshop clone, scriptable via JavaScript. In production, it turned into a maintenance sink:






Issue #1: The elusive iframe



PSD files had to be publicly hosted with Access-Control-Allow-Origin: *. A CORS requirement that the client's infrastructure couldn't meet.






Issue #2: Ghost exports



Exports traveled through a backend API route (/photopea/exports). Network latency or timeouts could silently truncate exports.






Issue #3: No server-side rendering



Everything went through the client's browser. No automated generation, no CI/CD pipeline.






Issue #4: The black box effect



When a poster had rendering issues, nobody could tell if the problem was Photopea, the network, the PSD, or the code.






The fix in 3 decisions






Decision 1: HTML template = poster



Instead of a closed PSD, each poster format is an open HTML file versioned in the repo. Full control of layout, CSS, SVG.






Decision 2: Playwright for server-side render



Headless Chromium via Playwright produces a perfect vector PDF and high-res PNG. Average time: 3.5 seconds per poster. Fully reproducible.






Decision 3: Single source of truth



The same HTML template serves both the live iframe preview AND the Playwright final render. Zero difference between preview and printed document.






The numbers











































Metric Before (Photopea) After (HTML Engine)
External dependencies 2 (Canva, Photopea) 1 (Playwright)
License cost $$$$ (Canva Enterprise) $0
Render time 30-60s (network dependent) ~3.5s
Server-side render Impossible PDF + PNG
Reliability Fragile Robust
Adding a template Complex config One folder + manifest





What I learned



"Free" solutions with complex infrastructure often end up costing more than a simple solution you fully control.



An HTML template isn't as powerful as a PSD — but it has three decisive advantages: it's readable, versionable, and reproducible.



Thanks to Nassim Tarkhani for pushing this direction. This idea saved the project.






Mohamed Amine Ben Mallessa — Lead Dev at Sollea AI

🔗



Need help with your technical stack? Sollea AI specializes in custom automation and AI solutions.






playwright #html #pdfgeneration #fastapi #nextjs #engineering #webdev #architecture









💻 Have a similar project?



Sollea AI — Full-stack development, AI automation, custom solutions.



🔗 · LinkedIn



Team led by **Mohamed Amine Ben Mallessa* — Lead Dev at Sollea AI*

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
1 Quelle
Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
1 Quelle
Major AI platforms go down in unprecedented simultaneous outage
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten From fragile iframes to server-side PDFs: a rendering migration story with Playwright

Thematisch verwandte Begriffe: From, fragile, iframes, serverside · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...