NielsSteensma / Dhalang

Generate PDFs and make screenshots of HTML using Puppeteer in Ruby
MIT License
40 stars 22 forks source link

Adding AutoHeight #28

Closed christianlerke closed 3 years ago

christianlerke commented 3 years ago

Adding a new attribute isAutoHeight Which when set to true automatically set's the height of the PDF based on the height of the document body.

This is needed to support PDF generation for receipt printers which print on a roll of paper which is automatically cut based on the height of the page. With this option the width can be set manually based of the width of the roll of paper and the height will be set automatically based on the content.

NielsSteensma commented 3 years ago

Thank you for contributing. Looks good and useful! I will merge the PR during the weekend and create a new release.