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

186
Views
Usando convertPdfToPng en Svelte obtengo No puedo acceder a 'devolución de llamada' antes de la inicialización

Intentando pasar un pdf a un script esbelto, para convertir las páginas a pdf.

 <script> import { onMount } from 'svelte'; import { convertPdfToPng } from 'convert-pdf-png'; let files; const convertAndDoSomething=(files)=> { const pdf = files[0]; console.log("been called"); convertPdfToPng(pdf, { outputType: 'callback', callback: callback }); const callback = images => { // the function returns an array // every img is a normal file object images.forEach(img => { console.log(img.filename); }); } }; </script> <input type="file" bind:files> {#if files && files[0]} <p use:convertAndDoSomething> {files[0].name} </p> {/if}

esto da un error: Uncaught (en promesa) ReferenceError: No se puede acceder a la 'devolución de llamada' antes de la inicialización en convertAndDoSomething (Example6.svelte:17:19) en Object.mount [as m] (Example6.svelte:38:6) en Object. actualizar [como p] (Ejemplo6.svelte:35:22) al actualizar (index.mjs:1075:36) al vaciar (index.mjs:1042:13)

about 4 years ago · Juan Pablo Isaza
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!