What changes when the blueprint owns the document
| Decision | Puppeteer | JayCode |
|---|---|---|
| Input for each render | A page to load or HTML content to render | A saved blueprint reference and document input data; no need to resend the layout |
| Content, styling, and logic | Your web page and the code that prepares it | One reusable blueprint containing document content, styling, expressions, conditions, and loops |
| Pagination | The browser’s print layout | Automatic page breaks as body content grows, plus explicit breaks when needed |
| Integration | Call Page.pdf() in your browser workflow | Submit a job; handle the result webhook |
| Existing HTML templates | Continue using them | Recreate them in JayCode |
Browser workflow reference: Puppeteer’s PDF generation guide.
Logic, layout, and pagination in one blueprint
Keep logic with the document
A JayCode blueprint defines both content and styling, alongside calculations, conditions, loops, and formatting. Your application supplies the business data; the blueprint determines how it becomes a document.
Send only the changing data
Register your blueprint once. Each new job references its slug and sends input values in vars. The saved layout and document logic stay on the platform.
Let pages flow automatically
JayCode automatically splits body content across pages as it grows. Long invoices and reports do not require manual page breaks for normal overflow. Add an explicit break when a section must start on a new page.
Explore blueprint logic → · Read about automatic pagination →
Generate the next invoice or report by changing its input data. Content rules and styling remain part of the reusable document definition, so you do not need to assemble and send the entire layout for every job.
Existing HTML/CSS templates need to be recreated as JayCode blueprints. If your goal is to print an existing web page, a browser workflow may still fit.
Migrate one representative document first
Already know HTML and CSS? Use the HTML-to-JayCode element and styling reference to map familiar elements to blueprint definitions.
Collect real cases
Choose a typical invoice or report, plus long text, missing optional values, and multi-page variants.
Move the document into a blueprint
Define content and styling with JayCode nodes, then move document calculations, conditions, and repeated sections into blueprint logic. Let automatic pagination handle growing content.
Send input data and connect delivery
Save the blueprint, then submit its reference and the input data for each document. Handle completed and failed webhook events in your app.
Compare the outputs
Review page breaks, fonts, totals, and missing resources. Measure your full submission-to-download workflow before switching traffic.
PDF rendering measured in milliseconds
JayCode’s purpose-built runtime focuses on document generation without launching or managing a browser. In published benchmark conditions, a Stripe-style single-page invoice rendered in about 20ms, while multi-page documents reached as low as about 5ms per page.
These renderer timings are separate from end-to-end delivery. The published JayCode benchmark recorded 36,000 jobs with no failed jobs, sustained throughput of 26.73 jobs/s, and 268ms p99.9 end-to-end completion time. The deployment used two workers on a 4-core AMD EPYC KVM and included file storage and webhook delivery.
These are JayCode benchmark observations, not a head-to-head Puppeteer test or a latency guarantee. Document complexity, workload, and delivery infrastructure affect results.