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

arulmb0136 picture arulmb0136  路  4Comments

mellisa0109 picture mellisa0109  路  3Comments

yankeeBrit picture yankeeBrit  路  3Comments

MaxCodeDE picture MaxCodeDE  路  4Comments

palmoni picture palmoni  路  4Comments