Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

255
Views
JSPDF: ¿cómo codificar blob en jsPDF?

Estoy usando jsPDF() y quiero presentar un documento, tengo el valor BASE64 y ahora quiero hacer un BLOB y volver a la vista normal ¿Cómo puedo hacer esto con JSPDF?

Ese es el código,

 const print = () => { const myFont = ""; var doc = new jsPDF(); doc.text(20, 20, "Name " ); doc.addFileToVFS("MyFont.ttf", myFont); doc.addFont("MyFont.ttf", "MyFont", "normal"); doc.output("dataurlnewwindow"); };

No sé cómo agregar la línea deseada

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

var blobPDF = new Blob([ doc.output() ], { type : 'application/pdf'}); var blobUrl = URL.createObjectURL(blobPDF); //<--- THE ERROR APPEARS HERE window.open(blobUrl); // will open a new tab //window.open(blobUrl,'_system','location=yes'); will open a new window

Esto funciona para mí.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!