alvarcarto/url-to-pdf-api

how to generate a PDF with automatic height?

Ouverte

#87 ouverte le 12 oct. 2018

 (3 commentaires) (0 réaction) (0 personne assignée)HTML (779 forks)batch import
help wantedquestion

Métriques du dépôt

Stars
 (7 104 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

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" ?

Guide contributeur