V
V
Vladislav2016-09-14 18:22:35
PHP
Vladislav, 2016-09-14 18:22:35

Generating pdf along with graphs?

Good afternoon! There is a page with reports consisting of tables and graphs. Charts - Morris.js, tables bootstrapTable (Library). It is necessary that this pdf can be downloaded at any time.
And what libraries are new (not 10 years old) and popular for PDF generation in PHP?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Aksentiev, 2016-09-14
@Sanasol

https://github.com/mpdf/mpdf
Normal lib.
Graphs are a separate story, they are in JS and do not apply to PHP or PDF, you need to render a picture and insert it into PDF. Or get html + css graphics on the output to convert to pdf.

A
Alexey Skobkin, 2016-09-14
@skobkin

wkhtmltopdf + Snappy . Graphs must be embedded in HTML. If these are pictures, then src should contain data and base64 of this very picture. If HTML+CSS - CSS must also be integrated into HTML.
This is the simplest version. And so the connection of external resources should work. But from experience it does not always work well.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question