Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render Javascript Content #817

Closed
Javedgouri opened this issue Mar 6, 2019 · 7 comments
Closed

Render Javascript Content #817

Javedgouri opened this issue Mar 6, 2019 · 7 comments

Comments

@Javedgouri
Copy link

I have a javascript code in my HTML which generate a graph using chart.js.
but when i generate pdf using HTML, the graph doesn't generate in pdf.

@liZe
Copy link
Member

liZe commented Mar 6, 2019

Hello!

WeasyPrint doesn't support JavaScript at all, and there's no plan to support it in the future.

You'll find more in #23 and #454 about how to execute JS or Python code before rendering the result with WeasyPrint.

@liZe liZe closed this as completed Mar 6, 2019
@Javedgouri
Copy link
Author

Workaround to do that?

@liZe
Copy link
Member

liZe commented Mar 6, 2019

Workaround to do that?

Yes, as I said in the previous comment, you'll find

@Javedgouri
Copy link
Author

Thank you.

@Christophe31
Copy link

would the DOM contain a canvas js generated content like for chart.js? I doubt. @Javedgouri did you manage to make this work or did you use something else? Like a python charting library to generate images?

@Javedgouri
Copy link
Author

i have used python library to generate the graph in svg and that svg i have rendered.

@Lohitha3
Copy link

i have used python library to generate the graph in svg and that svg i have rendered.

@Javedgouri Can you share the way you generated svg using some python library you mentioned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants