Is xhtml2pdf out of date?

Hello, i would like to get an advice on this matter.
I see that xhtml2pdf was last updated in 2018, but all tutorials show how to use it, to convert HTML to pdf.

Is that still a legit option? I don’t want to do it then have problems with client sites…thank you

That’s not what I’m seeing.

See xhtml2pdf · PyPI and GitHub - xhtml2pdf/xhtml2pdf: A library for converting HTML into PDFs using ReportLab

However, like all other Open Source projects, you do need to be aware of the risks involved with selecting it as a solution. You should be prepared at all times to repair, replace, or remove any individual product should it become non-viable in your environment.

1 Like

Thank you, i was referring to django-xhtml2pdf · PyPI
but i see that your link is different xhtml2pdf · PyPI

Can that be used with django instead of the one i asked about?

Thank you

Yes, django-xhtml2pdf is something different. It’s a wrapper around xhtml2pdf to provide easier integration with Django. It’s not that you’re using it instead of xhtml2pdf, it appears that the two work together. (I don’t see a link to a github repo - or any other repo - for django-xhtml2pdf, so I don’t know that for sure.)

Again, like all Open Source libraries, it’s up to you to evaluate the risk and decide just what your vulnerabilities are.

Thank you for the clarification, as more time passes, i am learning about new libraries, and this is starting to seem like WordPress plugin options and which one will you choose, but much more complex.

And with that, if the option you choose stops working and you are not a Django expert, you are in a big problem…

So the only solution is to learn how to do all of that the library you are interested in does, but that is basically impossible to learn…so the fact that Django supports rapid development is not really true :confused:

Exactly.

This is an issue with all Open Source solutions, the only difference between them is of the degree of risk.

It doesn’t matter whether you’re talking about Wordpress or Django, PostgreSQL or MySQL, Linux or OpenBSD, etc - that risk exists. Should something break, you have assumed the ultimate responsibility for fixing it.

Yes, in most cases, that risk is extremely small for the larger projects. I have no real concerns about selecting Linux, PostgreSQL, Python, and Django as the foundations of my development work. It’s when you get down to the small projects (roughly fewer than five contributors, but it varies), that you need to decide whether or not you’re up to picking up support for that library or product.

But I think you’re over-stating the difficulty of picking up internal support or fixed for a library. For example, the django-xhtml2pdf package you’re talking about here effectively consists of less than 150 lines of code. Do you need to be an “expert” to understand what that code it doing? I doubt it.