N
N
Ninja Mate2016-04-15 22:12:34
PHP
Ninja Mate, 2016-04-15 22:12:34

What is the easiest way to make saving div as pdf and png for application?

There is a ReactJS application with a section on d3.js that generates reports and graphs (PHP backing).
You need to save a separate div in two formats of your choice pdf and png.
How can this be done in the easiest way and where on the user side or on the server?
The important point is to save css formatting for the block.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2016-04-15
@victorzadorozhnyy

there are several libs:
https://github.com/MrRio/jsPDF
pdfkit.org
pdfmake.org

A
Andrey, 2016-04-15
@AndreyMyagkov

I know that it is possible to save the block in png on the client side, but what would be in pdf is unlikely. Dig towards the backend, there are special libraries

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question