Closed brendandahl closed 7 years ago
I can reproduce this using Windows 7 x64, Firefox 24.0 (HWA on) and the latest PDF.js development add-on. Note that the console also contains other warnings that might also have something to do with this. The document itself doesn't seem to show rendering issues.
Full console output:
[11:43:51.002] "XRefParseExceptionClosure@resource://pdf.js/build/pdf.worker.js:310 pdfjsWrapper@resource://pdf.js/build/pdf.worker.js:305 @resource://pdf.js/build/pdf.worker.js:39006 " [11:43:51.106] "Warning: Indexing all PDF objects" [11:43:51.147] "PDF 5e98f8cb30e3cbdee0ab8ea5ee12e4f [1.4 Acrobat Distiller 8.1.0 (Windows) / PScript5.dll Version 5.2.2] (PDF.js: 0.8.599)" [11:43:51.358] "Warning: Badly formated number" [11:43:52.000] "Warning: Unhandled rejection: Error: Invalid floating point number: NaN error@resource://pdf.js/build/pdf.worker.js:126 Lexer_getNumber@resource://pdf.js/build/pdf.worker.js:31154 Lexer_getObj@resource://pdf.js/build/pdf.worker.js:31333 Parser_shift@resource://pdf.js/build/pdf.worker.js:30791 Parser_getObj@resource://pdf.js/build/pdf.worker.js:30858 PartialEvaluator_getOperatorList@resource://pdf.js/build/pdf.worker.js:14385 Page_getOperatorList/<@resource://pdf.js/build/pdf.worker.js:3866 runHandlers@resource://pdf.js/build/pdf.worker.js:795 "
I just noticed Adobe is also complaining about a missing font (so not all fonts appear to be embedded) and it asks to resave when trying to close the document. The PDF must therefore be damaged. Labeling this as corrupted PDF.
This seems to have regressed somewhere because the second page won't load at all anymore. I now get this in the console:
"Error: Invalid XRef stream header" pdf.worker.js:250 "XRef_readXRef@resource://pdf.js/build/pdf.worker.js:3862:13 XRef_parse@resource://pdf.js/build/pdf.worker.js:3456:23 PDFDocument_setup@resource://pdf.js/build/pdf.worker.js:2692:7 PDFDocument_parse@resource://pdf.js/build/pdf.worker.js:2579:7 ensureHelper@resource://pdf.js/build/pdf.worker.js:2217:22 NetworkPdfManager_ensure/@resource://pdf.js/build/pdf.worker.js:2231:7 NetworkPdfManager_ensure@resource://pdf.js/build/pdf.worker.js:2211:1 BasePdfManager_ensureDoc@resource://pdf.js/build/pdf.worker.js:2082:14 loadDocument/@resource://pdf.js/build/pdf.worker.js:32388:11 " pdf.worker.js:252 "Warning: Unsupported feature "unknown"" pdf.worker.js:235 "Warning: Unsupported feature "unknown"" pdf.js:235 "Warning: Indexing all PDF objects" pdf.worker.js:235 "PDF 5e98f8cb30e3cbdee0ab8ea5ee12e4f [1.4 Acrobat Distiller 8.1.0 (Windows) / PScript5.dll Version 5.2.2] (PDF.js: 1.0.647)" viewer.js:3511 "Warning: TT: nested FDEFs not allowed" pdf.worker.js:235 "Warning: TT: ENDF bad stack" pdf.worker.js:235 "Warning: TT: nested IDEFs not allowed" pdf.worker.js:235 "Warning: Unknown/unsupported post table version 50331903" pdf.worker.js:235 "Warning: Could not find a preferred cmap table." pdf.worker.js:235 "Warning: Badly formated number" pdf.worker.js:235 "Error: Invalid number: ." pdf.worker.js:250 "Lexer_getNumber@resource://pdf.js/build/pdf.worker.js:29351:1 Lexer_getObj@resource://pdf.js/build/pdf.worker.js:29592:1 Parser_shift@resource://pdf.js/build/pdf.worker.js:28910:21 Parser_getObj@resource://pdf.js/build/pdf.worker.js:28915:7 EvaluatorPreprocessor_read@resource://pdf.js/build/pdf.worker.js:11871:19 next@resource://pdf.js/build/pdf.worker.js:10397:16 next/@resource://pdf.js/build/pdf.worker.js:10617:13 " pdf.worker.js:252 "Warning: Unsupported feature "unknown"" pdf.worker.js:235 "Warning: Unsupported feature "unknown"" pdf.js:235 downloadable font: head: Failed to read font magic number (font-family: "g_font_4" style:normal weight:normal stretch:normal src index:0) source: data:font/opentype;base64,AAEAAAAKAIAAAwAgT1MvMnOsZdsAAACsAAAAVmNtYXAAC+AzAAABBAAAACxnbHlmAAExAAAAATAAAAAQaGVhZIdc7FYAAAFAAAAANmhoZWHOBVUNAAABeAAAACRobXR4fwuGPgAAAZwAA+wAbG9jYewD7AAAA+2cAAH2Am1heHDrmeMFAAXjoAAAACBuYW1lBjWhbgAF48AAAAJScG9zdP/0AAAABeYUAAAAIAABAxwCvAAFAAAFmgUzACgAugWaBTMAUwGBAGYCEgEGAgIIAgYEAQkDAwAAAAMAAAAAAAAAAAAAAABNT05PACEAIPsCBQb9kwEcBo8CnAAAAAEAAAAAAAAAAAABAAMAAQAAAAwABAAgAAAABAAEAAEAAOAA//8AAOAA//8gAAABAAAAAAABAAAAAAAAAAAAAAAAMQAAAQAAAhmZ8wAAAAAPPPUAGygBAAAAAKqbQogAAAAAszKWD/5a/WQIMQdWAAAACQABAAAAAAAAAAABAAaP/WQAAABW/lr9zQgxB9IBsgAAAAAAAAAAAAAAAAD7AAAAAQAAAAABzQAAAc0AAAIUAFYEcQFoBVgAnAOqAFwF1QCwBcEArgI5AQQDKwCkAyv/mgQUKAC6VgDLAhT/5wLsAEwCFABWBD8A/gOqAFwDqgCsA6oAPQOqACEDqgAEA6oAVgOqAHsDqgDPA6oAiQOqAHkCFABWAhT/57pWAM26VgDLulYAzwLsAFQGqABaBKr/+ATBACsEPwCTBcEASgRqAC0EKwAzBT8AkQYrACsC7AAtA1b/O7pWAEQEKwAnBhQADAWBAHm6VgCWBJYASrpW downloadable font: head: failed to parse table (font-family: "g_font_4" style:normal weight:normal stretch:normal src index:0) source: data:font/opentype;base64,AAEAAAAKAIAAAwAgT1MvMnOsZdsAAACsAAAAVmNtYXAAC+AzAAABBAAAACxnbHlmAAExAAAAATAAAAAQaGVhZIdc7FYAAAFAAAAANmhoZWHOBVUNAAABeAAAACRobXR4fwuGPgAAAZwAA+wAbG9jYewD7AAAA+2cAAH2Am1heHDrmeMFAAXjoAAAACBuYW1lBjWhbgAF48AAAAJScG9zdP/0AAAABeYUAAAAIAABAxwCvAAFAAAFmgUzACgAugWaBTMAUwGBAGYCEgEGAgIIAgYEAQkDAwAAAAMAAAAAAAAAAAAAAABNT05PACEAIPsCBQb9kwEcBo8CnAAAAAEAAAAAAAAAAAABAAMAAQAAAAwABAAgAAAABAAEAAEAAOAA//8AAOAA//8gAAABAAAAAAABAAAAAAAAAAAAAAAAMQAAAQAAAhmZ8wAAAAAPPPUAGygBAAAAAKqbQogAAAAAszKWD/5a/WQIMQdWAAAACQABAAAAAAAAAAABAAaP/WQAAABW/lr9zQgxB9IBsgAAAAAAAAAAAAAAAAD7AAAAAQAAAAABzQAAAc0AAAIUAFYEcQFoBVgAnAOqAFwF1QCwBcEArgI5AQQDKwCkAyv/mgQUKAC6VgDLAhT/5wLsAEwCFABWBD8A/gOqAFwDqgCsA6oAPQOqACEDqgAEA6oAVgOqAHsDqgDPA6oAiQOqAHkCFABWAhT/57pWAM26VgDLulYAzwLsAFQGqABaBKr/+ATBACsEPwCTBcEASgRqAC0EKwAzBT8AkQYrACsC7AAtA1b/O7pWAEQEKwAnBhQADAWBAHm6VgCWBJYASrpWAJYFAAAnA4E downloadable font: rejected by sanitizer (font-family: "g_font_4" style:normal weight:normal stretch:normal src index:0) source: data:font/opentype;base64,AAEAAAAKAIAAAwAgT1MvMnOsZdsAAACsAAAAVmNtYXAAC+AzAAABBAAAACxnbHlmAAExAAAAATAAAAAQaGVhZIdc7FYAAAFAAAAANmhoZWHOBVUNAAABeAAAACRobXR4fwuGPgAAAZwAA+wAbG9jYewD7AAAA+2cAAH2Am1heHDrmeMFAAXjoAAAACBuYW1lBjWhbgAF48AAAAJScG9zdP/0AAAABeYUAAAAIAABAxwCvAAFAAAFmgUzACgAugWaBTMAUwGBAGYCEgEGAgIIAgYEAQkDAwAAAAMAAAAAAAAAAAAAAABNT05PACEAIPsCBQb9kwEcBo8CnAAAAAEAAAAAAAAAAAABAAMAAQAAAAwABAAgAAAABAAEAAEAAOAA//8AAOAA//8gAAABAAAAAAABAAAAAAAAAAAAAAAAMQAAAQAAAhmZ8wAAAAAPPPUAGygBAAAAAKqbQogAAAAAszKWD/5a/WQIMQdWAAAACQABAAAAAAAAAAABAAaP/WQAAABW/lr9zQgxB9IBsgAAAAAAAAAAAAAAAAD7AAAAAQAAAAABzQAAAc0AAAIUAFYEcQFoBVgAnAOqAFwF1QCwBcEArgI5AQQDKwCkAyv/mgQUKAC6VgDLAhT/5wLsAEwCFABWBD8A/gOqAFwDqgCsA6oAPQOqACEDqgAEA6oAVgOqAHsDqgDPA6oAiQOqAHkCFABWAhT/57pWAM26VgDLulYAzwLsAFQGqABaBKr/+ATBACsEPwCTBcEASgRqAC0EKwAzBT8AkQYrACsC7AAtA1b/O7pWAEQEKwAnBhQADAWBAHm6VgCWBJYASrpWAJYFAAAnA4EAOQSWA downloadable font: font load failed (font-family: "g_font_4" style:normal weight:normal stretch:normal src index:0) source: data:font/opentype;base64,AAEAAAAKAIAAAwAgT1MvMnOsZdsAAACsAAAAVmNtYXAAC+AzAAABBAAAACxnbHlmAAExAAAAATAAAAAQaGVhZIdc7FYAAAFAAAAANmhoZWHOBVUNAAABeAAAACRobXR4fwuGPgAAAZwAA+wAbG9jYewD7AAAA+2cAAH2Am1heHDrmeMFAAXjoAAAACBuYW1lBjWhbgAF48AAAAJScG9zdP/0AAAABeYUAAAAIAABAxwCvAAFAAAFmgUzACgAugWaBTMAUwGBAGYCEgEGAgIIAgYEAQkDAwAAAAMAAAAAAAAAAAAAAABNT05PACEAIPsCBQb9kwEcBo8CnAAAAAEAAAAAAAAAAAABAAMAAQAAAAwABAAgAAAABAAEAAEAAOAA//8AAOAA//8gAAABAAAAAAABAAAAAAAAAAAAAAAAMQAAAQAAAhmZ8wAAAAAPPPUAGygBAAAAAKqbQogAAAAAszKWD/5a/WQIMQdWAAAACQABAAAAAAAAAAABAAaP/WQAAABW/lr9zQgxB9IBsgAAAAAAAAAAAAAAAAD7AAAAAQAAAAABzQAAAc0AAAIUAFYEcQFoBVgAnAOqAFwF1QCwBcEArgI5AQQDKwCkAyv/mgQUKAC6VgDLAhT/5wLsAEwCFABWBD8A/gOqAFwDqgCsA6oAPQOqACEDqgAEA6oAVgOqAHsDqgDPA6oAiQOqAHkCFABWAhT/57pWAM26VgDLulYAzwLsAFQGqABaBKr/+ATBACsEPwCTBcEASgRqAC0EKwAzBT8AkQYrACsC7AAtA1b/O7pWAEQEKwAnBhQADAWBAHm6VgCWBJYASrpWAJYFAAAnA4EAOQSWANkGKw
Closing as fixed by PR #8240. (But note that since the PDF file is corrupt, no PDF viewer is able to render the file completely.)
http://www.fs.usda.gov/Internet/FSE_DOCUMENTS/fsbdev7_018794.pdf#page=2