No package for PDF convertion in notebooks

I need to generate a custom PDF report from an HTML document in a notebook.
I looked for a package that could help me in Losant docs and I noticed that the platform does not provide any package.
I saw one topic similar to this.
There is a way I can do it? If not, this topic is an idea of platform improvement in future updates.

Hi @viertel,

Welcome to the Losant Forums!

We did in fact implement pypdf2 ( as a result of the thread you linked to. This library allows for the creation of customized pdf documents (

Let me know if this sets you on the right path!


Hi @Aidan_Zebertavage,

As I saw in PyPDF2 documentation and in examples on the Internet, PyPDF2 is a very powerfull library for manipulation and information extraction from already created PDFs.
My problem is to generate a new PDF, with its own information and format, defined in an HTML template with CSS stylesheets, for example.
I believe that PyPDF2 is not so good for this purpose, unless someone could show me some alternative.
I mean libraries like Weasyprint or PyFPDF.


Hi @viertel,

Sure not a problem, I’ve made a feature request to incorporate the Weasyprint library. I’ll keep you updated on any updates I hear from our engineering team.


1 Like