“nodo js crea pdf desde html” Código de respuesta

nodo js servir archivo pdf

res.setHeader('Content-Type', 'application/pdf')
CL

nodo js crea pdf desde html

The problem with using PDF converter libraries available on NPM like pdfkit is that, you gonna have to recreate the page structures again in your html templates to get the desired output.

One of the best approach to rendering html and convert to pdf is by using Puppeteer on NodeJs. Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. It can be used to generate screenshots and PDFs of html pages in your case.
Santino

nodo js servir archivo pdf

app.use('/pdf', express.static(__dirname + '/pathToPDF'));
Worrisome Wallaby

Respuestas similares a “nodo js crea pdf desde html”

Preguntas similares a “nodo js crea pdf desde html”

Más respuestas relacionadas con “nodo js crea pdf desde html” en JavaScript

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código