0

I want to print HTML element as PDF, which has some background color, images. I need some solution either client-side or server-side(Django/Python).

I have used jsPDF, on client side, it worked. but it does not support css.

For Django I have come across ReportLab, but still not sure if it will do the work. Do you guys have any idea/library which can do that.

1
  • You could also look at cloudformatter.com/css2pdf . It is jQuery plug-in in browser to send HTML+CSS to a remote server to be rendered. It supports PDF as well as many other outputs including image, Postscript, XPS, ... Commented Sep 2, 2015 at 18:35

1 Answer 1

1

Take look at wkhtmltopdf. It uses WebKit to render page as you browser will do, and converts that rendered page into PDF document. It's an command line tool, but there are some simple packages that integrates it into django, like: django-wkhtmltopdf

Sign up to request clarification or add additional context in comments.

1 Comment

Your answer might solve my problem, and after researching I too find wkhtmltopdf relevant, but I have dropped the plan for css now, so could not test it. Thanks for the suggestion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.