From b9d65960f993afbcc5aeecc5f147734f5e846ef2 Mon Sep 17 00:00:00 2001 From: Pdf Bot Date: Mon, 11 Jan 2016 17:00:11 +0000 Subject: [PATCH] PDF.js version 1.3.165 - See mozilla/pdf.js@3057b69e450e1a5d29c2f0732ddc08d7d9861a34 --- bower.json | 2 +- build/pdf.combined.js | 18 +++++++++++++++--- build/pdf.js | 4 ++-- build/pdf.worker.js | 18 +++++++++++++++--- package.json | 2 +- 5 files changed, 34 insertions(+), 10 deletions(-) diff --git a/bower.json b/bower.json index b502e8e06..df0a30887 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.3.163", + "version": "1.3.165", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index fcbed6fc8..676ff75de 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.3.163'; -var pdfjsBuild = '30b8f41'; +var pdfjsVersion = '1.3.165'; +var pdfjsBuild = '3057b69'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? @@ -35048,7 +35048,14 @@ var Font = (function FontClosure() { } // Some CIDFontType0C fonts by mistake claim CIDFontType0. if (type === 'CIDFontType0') { - subtype = isType1File(file) ? 'CIDFontType0' : 'CIDFontType0C'; + if (isType1File(file)) { + subtype = 'CIDFontType0'; + } else if (isOpenTypeFile(file)) { + // Sometimes the type/subtype can be a complete lie (see issue6782.pdf). + type = subtype = 'OpenType'; + } else { + subtype = 'CIDFontType0C'; + } } var data; @@ -35132,6 +35139,11 @@ var Font = (function FontClosure() { return readUint32(header, 0) === 0x00010000; } + function isOpenTypeFile(file) { + var header = file.peekBytes(4); + return bytesToString(header) === 'OTTO'; + } + function isType1File(file) { var header = file.peekBytes(2); // All Type1 font programs must begin with the comment '%!' (0x25 + 0x21). diff --git a/build/pdf.js b/build/pdf.js index 36a6462e9..214045757 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.3.163'; -var pdfjsBuild = '30b8f41'; +var pdfjsVersion = '1.3.165'; +var pdfjsBuild = '3057b69'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 690e054c6..eac61f073 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.3.163'; -var pdfjsBuild = '30b8f41'; +var pdfjsVersion = '1.3.165'; +var pdfjsBuild = '3057b69'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? @@ -27217,7 +27217,14 @@ var Font = (function FontClosure() { } // Some CIDFontType0C fonts by mistake claim CIDFontType0. if (type === 'CIDFontType0') { - subtype = isType1File(file) ? 'CIDFontType0' : 'CIDFontType0C'; + if (isType1File(file)) { + subtype = 'CIDFontType0'; + } else if (isOpenTypeFile(file)) { + // Sometimes the type/subtype can be a complete lie (see issue6782.pdf). + type = subtype = 'OpenType'; + } else { + subtype = 'CIDFontType0C'; + } } var data; @@ -27301,6 +27308,11 @@ var Font = (function FontClosure() { return readUint32(header, 0) === 0x00010000; } + function isOpenTypeFile(file) { + var header = file.peekBytes(4); + return bytesToString(header) === 'OTTO'; + } + function isType1File(file) { var header = file.peekBytes(2); // All Type1 font programs must begin with the comment '%!' (0x25 + 0x21). diff --git a/package.json b/package.json index a9dfe51af..2e6071dcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.3.163", + "version": "1.3.165", "main": "build/pdf.js", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [