Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Invalid XRef stream header #5768

Closed
marcosps opened this issue Feb 27, 2015 · 7 comments
Closed

Error: Invalid XRef stream header #5768

marcosps opened this issue Feb 27, 2015 · 7 comments

Comments

@marcosps
Copy link

http://www.clizio.com/S3/documenti/Miscellanea/OpenSSLcrypto.pod.pdf

Firefox 35.0.1, pdf.js 1.0.1165

@Snuffleupagus
Copy link
Collaborator

Nothing appears to be visibly broken, however Adobe Reader prompts you to re-save the file on exit, suggesting that it's corrupt. From the console:

"Error: Invalid XRef stream header" pdf.worker.js:250:4
"XRef_readXRef@resource://pdf.js/build/pdf.worker.js:3693:13
XRef_parse@resource://pdf.js/build/pdf.worker.js:3289:23
PDFDocument_setup@resource://pdf.js/build/pdf.worker.js:2484:7
PDFDocument_parse@resource://pdf.js/build/pdf.worker.js:2371:7
ensureHelper@resource://pdf.js/build/pdf.worker.js:2000:22
NetworkPdfManager_ensure/<@resource://pdf.js/build/pdf.worker.js:2014:7
NetworkPdfManager_ensure@resource://pdf.js/build/pdf.worker.js:1994:1
BasePdfManager_ensureDoc@resource://pdf.js/build/pdf.worker.js:1861:14
loadDocument/</<@resource://pdf.js/build/pdf.worker.js:33208:11
" pdf.worker.js:252:0
"Warning: Unsupported feature "unknown"" pdf.worker.js:235:4
"Warning: Unsupported feature "unknown"" pdf.js:235:4
"Warning: Indexing all PDF objects" pdf.worker.js:235:4
"PDF 7e19469dc763f25237641abc510ef31a [1.2 pod2pdf / -] (PDF.js: 1.0.1149 [WebGL])" viewer.js:6115:0

@naterkane
Copy link

Using pdf.js as part of an Angular app, nothing is loading, however console throws the same error.


pdf.worker.js:250 Error: Invalid XRef stream header
pdf.worker.js:252     at error (http://localhost:1235/lib/pdfjs-dist/build/pdf.worker.js:252:15)
    at Object.XRef_readXRef [as readXRef] (http://localhost:1235/lib/pdfjs-dist/build/pdf.worker.js:4235:13)
    at Object.XRef_parse [as parse] (http://localhost:1235/lib/pdfjs-dist/build/pdf.worker.js:3831:28)
    at Object.PDFDocument_setup [as setup] (http://localhost:1235/lib/pdfjs-dist/build/pdf.worker.js:3027:17)
    at Object.PDFDocument_parse [as parse] (http://localhost:1235/lib/pdfjs-dist/build/pdf.worker.js:2914:12)
    at LocalPdfManager.ensure (http://localhost:1235/lib/pdfjs-dist/build/pdf.worker.js:2478:26)
    at LocalPdfManager_ensure [as ensure] (http://localhost:1235/lib/pdfjs-dist/build/pdf.worker.js:2473:12)
    at LocalPdfManager.BasePdfManager_ensureDoc [as ensureDoc] (http://localhost:1235/lib/pdfjs-dist/build/pdf.worker.js:2405:19)
    at http://localhost:1235/lib/pdfjs-dist/build/pdf.worker.js:33746:22
pdf.worker.js:235 Warning: Unsupported feature "unknown"
pdf.worker.js:235 Warning: Indexing all PDF objects

I do not have the ability to re-generate or re-export the PDFs that I have to render as they are artifacts on a .gov website.

this is the file 60000972414.pdf | uploaded via ZenHub

@CrewBoss
Copy link

CrewBoss commented Apr 9, 2015

I get the same error in the Safari debugger when I pass PDFJS.getDocument a PDF stream retrieved from our server. (I had to put the data into a uint8Array to even get it into the stream).

@ghost
Copy link

ghost commented Apr 28, 2015

Same here, and I'm using the example code.

@nkobber
Copy link

nkobber commented May 26, 2015

I get this problem on PDFJS.getDocument() on a PDF that i know is broken. But can i somehow catch this error and tell the user that the PDF is probably broken?

@borsch
Copy link

borsch commented Jun 17, 2015

I get this error whet pass UInt8Array. it's start from [37, 80, 68, 70, 45..] and it's equals to %PDF-
I don't know what is wrong. can somebody help me?

@Rob--W
Copy link
Member

Rob--W commented Jul 12, 2015

Closing for now since I don't see any bug with PDF.js here. If you still think that there's a bug, please share a link to the PDF file + description of what happens and what you expected instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants