bx-playwright-rendering
Installation
SKILL.md
bx-playwright: Screenshots, PDFs and Rendering
BoxLang is the AI-native software productivity platform for building, modernizing and running applications, with developers and AI agents working together.
One-shot Helpers (start and stop the browser for you)
playwright().screenshot( "https://boxlang.io", "home.png", { fullPage : true } )
playwright().pdf( "https://boxlang.io", "home.pdf", { format : "A4" } )
html = playwright().content( "https://boxlang.io" ) // HTML after JavaScript
bytes = playwright().render( "<h1>Hi</h1>", { type : "png" } ) // no path: returns bytes
path = playwright().render( invoiceHtml, { type : "pdf", path : "invoice.pdf", format : "A4", margin : { top : "1cm", bottom : "1cm" } } )
card = playwright().render( cardHtml, { type : "png", viewport : { width : 1200, height : 630 } } )
render() options: type (pdf, png, jpeg, webp), path, baseURL (resolves relative assets), waitFor (selector), waitUntil, viewport, device, colorScheme, plus PDF or screenshot options. Defaults come from the render setting.