diff --git a/app/directives/pdf.ts b/app/directives/pdf.ts index 70cee367..7a58fae2 100644 --- a/app/directives/pdf.ts +++ b/app/directives/pdf.ts @@ -223,11 +223,14 @@ export default function(app) { container: this.element[0], textContent: this.textContent, viewport, + enhanceTextSelection: true, }); // wait for renderTask await this.renderTask; + this.renderTask.expandTextDivs(true); + // normalize the DOM subtree of the rendered page // (otherwise serialized ranges may be based on different DOM states) this.element[0].normalize(); diff --git a/gulpfile.js b/gulpfile.js index 3bc71cae..77601acd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -157,7 +157,7 @@ gulp.task('vendor', [], function() { var mathjax = gulp.src(mathjaxSrc, {base: mathjaxBase}) .pipe(gulp.dest(buildDir + '/assets/mathjax')); - var pdfjs = gulp.src('jspm_packages/github/mozilla/pdfjs-dist@1.5.389/build/pdf.worker.js') + var pdfjs = gulp.src('jspm_packages/github/mozilla/pdfjs-dist@1.5.415/build/pdf.worker.js') .pipe(dev ? gutil.noop() : streamify(uglify({ // disable compression, otherwise pdf rendering fails! // see https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#minified diff --git a/jspm.config.js b/jspm.config.js index c734a1ef..83d46046 100644 --- a/jspm.config.js +++ b/jspm.config.js @@ -79,10 +79,11 @@ SystemJS.config({ "kramed": "npm:kramed@0.5.6", "leaflet": "github:Leaflet/Leaflet@0.7.7", "lodash": "npm:lodash@4.15.0", + "mozilla/pdfjs-dist": "github:mozilla/pdfjs-dist@1.5.415", "os": "github:jspm/nodelibs-os@0.2.0-alpha", "paperhive-sources": "npm:paperhive-sources@4.0.2", "path": "github:jspm/nodelibs-path@0.2.0-alpha", - "pdfjs-dist": "github:mozilla/pdfjs-dist@1.5.389", + "pdfjs-dist": "github:mozilla/pdfjs-dist@1.5.415", "process": "github:jspm/nodelibs-process@0.2.0-alpha", "rangy": "github:timdown/rangy-release@1.3.0", "readline": "github:jspm/nodelibs-readline@0.2.0-alpha", diff --git a/package.json b/package.json index 0dd5c82f..c8bf4a76 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,7 @@ "angular-sanitize": "github:angular/bower-angular-sanitize@^1.5.8", "jquery": "npm:jquery@^3.1.0", "lodash": "npm:lodash@^4.15.0", + "mozilla/pdfjs-dist": "github:mozilla/pdfjs-dist@^1.5.415", "paperhive-sources": "npm:paperhive-sources@^4.0.2", "pdfjs-dist": "github:mozilla/pdfjs-dist@^1.5.389", "rangy": "github:timdown/rangy-release@^1.3.0", @@ -188,7 +189,7 @@ } } }, - "github:mozilla/pdfjs-dist@1.5.389": { + "github:mozilla/pdfjs-dist@1.5.415": { "meta": { "web/compatibility.js": { "format": "global"