Browse Source

PDF.js version 1.1.151

master v1.1.151
Pdf Bot 10 years ago
parent
commit
de9a1bc7e7
  1. 2
      bower.json
  2. 18
      build/pdf.combined.js
  3. 8
      build/pdf.js
  4. 18
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.1.149",
"version": "1.1.151",
"main": [
"build/pdf.js",
"build/pdf.worker.js"

18
build/pdf.combined.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.1.149';
PDFJS.build = '3f3fb1e';
PDFJS.version = '1.1.151';
PDFJS.build = '07af86c';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -973,6 +973,10 @@ function stringToUTF8String(str) { @@ -973,6 +973,10 @@ function stringToUTF8String(str) {
return decodeURIComponent(escape(str));
}
function utf8StringToString(str) {
return unescape(encodeURIComponent(str));
}
function isEmptyObj(obj) {
for (var key in obj) {
return false;
@ -16005,6 +16009,14 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() { @@ -16005,6 +16009,14 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
var fileIdBytes = stringToBytes(fileId);
var passwordBytes;
if (password) {
if (revision === 6) {
try {
password = utf8StringToString(password);
} catch (ex) {
warn('CipherTransformFactory: ' +
'Unable to convert UTF8 encoded password.');
}
}
passwordBytes = stringToBytes(password);
}
@ -16109,7 +16121,7 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() { @@ -16109,7 +16121,7 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
CipherTransformFactory.prototype = {
createCipherTransform:
function CipherTransformFactory_createCipherTransform(num, gen) {
function CipherTransformFactory_createCipherTransform(num, gen) {
if (this.algorithm === 4 || this.algorithm === 5) {
return new CipherTransform(
buildCipherConstructor(this.cf, this.stmf,

8
build/pdf.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.1.149';
PDFJS.build = '3f3fb1e';
PDFJS.version = '1.1.151';
PDFJS.build = '07af86c';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -973,6 +973,10 @@ function stringToUTF8String(str) { @@ -973,6 +973,10 @@ function stringToUTF8String(str) {
return decodeURIComponent(escape(str));
}
function utf8StringToString(str) {
return unescape(encodeURIComponent(str));
}
function isEmptyObj(obj) {
for (var key in obj) {
return false;

18
build/pdf.worker.js vendored

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.1.149';
PDFJS.build = '3f3fb1e';
PDFJS.version = '1.1.151';
PDFJS.build = '07af86c';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it
@ -973,6 +973,10 @@ function stringToUTF8String(str) { @@ -973,6 +973,10 @@ function stringToUTF8String(str) {
return decodeURIComponent(escape(str));
}
function utf8StringToString(str) {
return unescape(encodeURIComponent(str));
}
function isEmptyObj(obj) {
for (var key in obj) {
return false;
@ -9652,6 +9656,14 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() { @@ -9652,6 +9656,14 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
var fileIdBytes = stringToBytes(fileId);
var passwordBytes;
if (password) {
if (revision === 6) {
try {
password = utf8StringToString(password);
} catch (ex) {
warn('CipherTransformFactory: ' +
'Unable to convert UTF8 encoded password.');
}
}
passwordBytes = stringToBytes(password);
}
@ -9756,7 +9768,7 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() { @@ -9756,7 +9768,7 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
CipherTransformFactory.prototype = {
createCipherTransform:
function CipherTransformFactory_createCipherTransform(num, gen) {
function CipherTransformFactory_createCipherTransform(num, gen) {
if (this.algorithm === 4 || this.algorithm === 5) {
return new CipherTransform(
buildCipherConstructor(this.cf, this.stmf,

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.1.149",
"version": "1.1.151",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [
"Mozilla",

Loading…
Cancel
Save