Jspdf: How to use the reactjs?

Created on 18 Nov 2016  路  5Comments  路  Source: MrRio/jsPDF

How to use the reactjs?

Most helpful comment

const pdfConverter = require('jspdf');

Then:

const pdf = new pdfConverter('p', 'mm', 'a4');
pdf.fromHTML(window.document.getElementById('divToPDF'), 10, 10,{'width': 180});
pdf.save('test.pdf');

All 5 comments

const pdfConverter = require('jspdf');

Then:

const pdf = new pdfConverter('p', 'mm', 'a4');
pdf.fromHTML(window.document.getElementById('divToPDF'), 10, 10,{'width': 180});
pdf.save('test.pdf');

@matias89 Thank you very much.

@ulongx this issue can be closed

it works fine, but the css style not taking to the pdf, why is that ?

Did you use fromHTML() or html()? ThefromHTML` method is deprecated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

doubletaketech picture doubletaketech  路  53Comments

dusantrtica picture dusantrtica  路  28Comments

g0ddest picture g0ddest  路  58Comments

eKoopmans picture eKoopmans  路  68Comments

ankur2728 picture ankur2728  路  28Comments