var fs = require('fs'); var pdf = require('html-pdf'); //var pdf = require('html-pdf'); var html = fs.readFileSync(resp, 'utf8'); var options = { format: 'Letter' }; pdf.create(html, options).toFile('./businesscard.pdf', function (err, res) { if (err) return console.log(err); console.log(res); // { filename: '/app/businesscard.pdf' } });esto tiene el siguiente error: no se pudo compilar. ./src/app/components/ssclabel-container/screen2.js Módulo no encontrado: no se puede resolver 'html-pdf' en 'C:\REACT\MDCV3\src\app\components\ssclabel-container'
¿Terminar trabajo por lotes (S/N)? y Tenga en cuenta que el siguiente comando funciona y se genera el archivo odf. PD C:\REACT\MDCV3> html-pdf ./businesscard.html businesscard2.pdf PD C:\REACT\MDCV3>