0

I'm attempting to generate pdf reports based on selected parameters on a webpage via javascript. I'm using D3 to generate charts and it would amazing to have those same charts appear on a pdf. In searching for a solution I came across this:

Generating PDF files with Javascript

jsPDF seems like a possible solution. I was wondering if there are any best practices in pdf report generation from a webpage.

Community
  • 1
  • 1
Ben Rudolph
  • 2,509
  • 2
  • 19
  • 26

1 Answers1

0

D3 charts are SVG charts, injecting SVG into PDF can be done with various XSL FO technologies. You could run a web service XSL FO formatting solution and send the content with SVGs inside to it and format to PDF.

Kevin Brown
  • 8,805
  • 2
  • 20
  • 38