diff --git a/bower.json b/bower.json
index 29dd56e47..6045de0e0 100644
--- a/bower.json
+++ b/bower.json
@@ -31,9 +31,10 @@
"ckeditor": "~4.5.4",
"angular-ckeditor": "~1.0.0",
"roboto-condensed": "~0.3.0",
- "open-sans-fontface": "https://github.com/OpenSlides/open-sans.git#1.4.2.post1"
+ "open-sans-fontface": "https://github.com/OpenSlides/open-sans.git#1.4.2.post1",
+ "angular-pdf": "~1.3.0"
},
"resolutions": {
- "angular": "^1.2.x"
+ "angular": ">=1.4.9 <1.5"
}
}
diff --git a/gulpfile.js b/gulpfile.js
index d33c060f9..62c6dc36e 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -21,6 +21,7 @@ var argv = require('yargs').argv,
mainBowerFiles = require('main-bower-files'),
minifyCSS = require('gulp-minify-css'),
path = require('path'),
+ rename = require("gulp-rename"),
through = require('through2'),
uglify = require('gulp-uglify'),
vsprintf = require('sprintf-js').vsprintf;
@@ -69,6 +70,13 @@ gulp.task('ckeditor', function () {
.pipe(gulp.dest(path.join(output_directory, 'ckeditor')));
});
+// Extra task only for pdfjs
+gulp.task('pdfjs', function () {
+ return gulp.src(path.join('bower_components', 'pdfjs-dist', 'build', 'pdf.worker.js'))
+ .pipe(rename(path.join('openslides-libs.worker.js')))
+ .pipe(gulp.dest(path.join(output_directory, 'js')));
+});
+
// Compiles translation files (*.po) to *.json and saves them in the directory
// openslides/static/i18n/.
gulp.task('translations', function () {
@@ -80,7 +88,7 @@ gulp.task('translations', function () {
});
// Gulp default task. Runs all other tasks before.
-gulp.task('default', ['js-libs', 'css-libs', 'fonts-libs', 'ckeditor', 'translations'], function () {});
+gulp.task('default', ['js-libs', 'css-libs', 'fonts-libs', 'ckeditor', 'pdfjs', 'translations'], function () {});
/**
diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js
index c80722338..910924b27 100644
--- a/openslides/core/static/js/core/base.js
+++ b/openslides/core/static/js/core/base.js
@@ -10,6 +10,7 @@ angular.module('OpenSlidesApp.core', [
'ngSanitize', // TODO: only use this in functions that need it.
'ui.bootstrap',
'ui.tree',
+ 'pdf'
])
.config([
diff --git a/openslides/core/static/templates/projector.html b/openslides/core/static/templates/projector.html
index 10bc998be..5a21f5f13 100644
--- a/openslides/core/static/templates/projector.html
+++ b/openslides/core/static/templates/projector.html
@@ -7,6 +7,7 @@
+