alvarcarto / alvarcarto/url-to-pdf-api

how to generate a PDF with automatic height?

Open
#87 3 comments 0 reactions 0 assignees View on GitHub
help wanted question
Dominant language
HTML
Stars
7.1k
Forks
779
PR merge metrics
No merged PRs in 30d

Description

I use this Puppeteer microservice to generate receipts in PDF. For each receipt, width is always the same, but height changes, according to the article count in the order.

For now, I'm using the article count to approximate the required height for my receipt. It kind of works, but it's not perfect and is a dirty way to do.
Is there way to tell Puppeteer API : "Please automatically find the right PDF height, according to the HTML body height, in order to generate a perfectly sized PDF" ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.