Jspdf-autotable: I need use a component as jsPDF-AutoTable in React.

Created on 17 Feb 2020  路  2Comments  路  Source: simonbengtsson/jsPDF-AutoTable

Hi guys, good morning. Is posible use this component in React? How? As I do any other component?

I'm sorry for molest with my question.

Regards

Javier.

question

Most helpful comment

Thank you so much MMGHV for your help. I thought in this possibility, but I didn't want work without security that was possible use.
Regards.
Javier.

All 2 comments

This is a normal javascript plugin, and it doesn't interact with the DOM, so what prevents you from using it in React? I myself use it in VueJS.

You npm install jspdf jspdf-autotable and import it:

import jsPDF from 'jspdf'
import 'jspdf-autotable'

// ..

function print() {
  const doc = new jsPDF()
  doc.autoTable({ /* .. */ })
  doc.save('print.pdf')
}

Thank you so much MMGHV for your help. I thought in this possibility, but I didn't want work without security that was possible use.
Regards.
Javier.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AminBangash picture AminBangash  路  5Comments

cplaiu picture cplaiu  路  3Comments

sirishasd picture sirishasd  路  4Comments

bsparacino picture bsparacino  路  3Comments

simonbengtsson picture simonbengtsson  路  5Comments