Puppeteer PDF alternative

Define the document once. Send data. Render in milliseconds.

JayCode blueprints bring content, styling, and document logic together. Save a blueprint once, then send its reference and the document’s input data for each render. JayCode handles automatic page breaks and generates PDFs without a browser runtime.

What changes when the blueprint owns the document

Choose based on what you need to render
DecisionPuppeteerJayCode
Input for each renderA page to load or HTML content to renderA saved blueprint reference and document input data; no need to resend the layout
Content, styling, and logicYour web page and the code that prepares itOne reusable blueprint containing document content, styling, expressions, conditions, and loops
PaginationThe browser’s print layoutAutomatic page breaks as body content grows, plus explicit breaks when needed
IntegrationCall Page.pdf() in your browser workflowSubmit a job; handle the result webhook
Existing HTML templatesContinue using themRecreate 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 →

Reuse the blueprint across your workflow

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.

  1. Collect real cases

    Choose a typical invoice or report, plus long text, missing optional values, and multi-page variants.

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

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

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

Read the benchmark context →

Build your first document

Start with a blueprint. Make it yours.

Explore working examples, then connect a render job to your application.