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

326
Views
Error al acceder a "autoAllocateChunkSize" en PDFJS

Tengo un nuevo problema después de la actualización de Firefox 99. Tengo una extensión que lee archivos PDF usando PDFJS (versión pdfjs-2.13.216 ). Siempre funcionó y después de la última actualización comenzó a dar: Error: Permiso denegado para acceder a la propiedad "autoAllocateChunkSize" La misma extensión, con pequeños cambios, funciona normalmente en Chrome. A continuación se muestra el código:

 function getAllTextPDF(urlPDF) { return new Promise(function (resolve , reject ) { var pdfjsLib = this['pdfjs-dist/build/pdf']; //this because of firefox pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js'; var loadingTask = pdfjsLib.getDocument(urlPDF); //** from that line it no longer enters and generates the mentioned error ** loadingTask.promise.then(function(pdf) { var numPages = pdf._pdfInfo.numPages; var textoFinal = ''; var pagesPromises = []; for (var i = 0; i < numPages; i++) { (function (pageNumber) { pagesPromises.push(getPageText(pageNumber, pdf)); })(i + 1); } Promise.all(pagesPromises).then(function (pagesText) { for (var i = 0; i < pagesText.length; i++) { textoFinal += pagesText[i]; } if(textoFinal.length > 0){ resolve({text: textoFinal}); loadingTask.destroy(); delete pdfjsLib; delete loadingTask; } }); }, function (reason) { // PDF loading error reject({reason}); return 0; }); }); }

URL de ejemplo de archivo para leer (funciona normalmente):

 blob:https://dominio.com/4db038e1-ae8d-4a15-a78f-0d9d0a182c7c

La idea del método es simple, revisa el archivo pdf y devuelve todo el texto. Sin embargo, ahora, como se mencionó, se genera el error. Detalle que no generaba el error en la versión 32bit de firefox, creo que empezó en la última actualización de firefox 99.

Aprecio tu ayuda.

about 4 years ago · Santiago Trujillo
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!