0% found this document useful (0 votes)
9 views1 page

Create PDF With Random Content and Variable Size - R - Learnpython

Uploaded by

harjo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Create PDF With Random Content and Variable Size - R - Learnpython

Uploaded by

harjo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Create PDF with random content and variable size : r/learnpython https://www.reddit.com/r/learnpython/comments/14jcy6w/create_pdf_w...

r/learnpython Search in r/le… Create

r/learnpython • 1 yr. ago


InternetSea8293

Create PDF with random content and variable size


I want to code a programm that can create PDFs of Variable lenght with some text and/or pictures.

What library is suited for this?

2 1 Share

Add a comment

Sort by: Best Search Comments

vidoardes • 1y ago •
vidoardes

You don't need python to do this, easiest and free way is to use HTML/CSS and PagedJS. Use the browsers
print to PDF function to create PDF files from HTML, and HTML is infinitely template-able.

There is little information about how you want to do this - will this be from your machine, or from a
website?

Depending on your use case you could use Python to craft a template with something like Jinja, or send
your template HTML and a data file (JSON) to a headless instance of Chrome, use a JS library like
Handlebars to do the templating and download the PDF (have done with with AWS lambda) in a single
API call.

2 Reply

1 de 1 15/11/2024, 23:31

You might also like