Commit 5f89e0ed authored by NilpotentHX3's avatar NilpotentHX3

Autoappro Ooshop: Changé PDFJS en pdfjsLib

parent 42042228
......@@ -237,11 +237,11 @@ angular.module('bars.admin.food', [
* https://stackoverflow.com/questions/1554280/extract-text-from-pdf-in-javascript#29111164
*/
function pdfToText(data) {
PDFJS.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js';
PDFJS.cMapUrl = 'js/vendor/pdfjs/cmaps/';
PDFJS.cMapPacked = true;
pdfjsLib.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js';
pdfjsLib.cMapUrl = 'js/vendor/pdfjs/cmaps/';
pdfjsLib.cMapPacked = true;
return PDFJS.getDocument(data).then(function(pdf) {
return pdfjsLib.getDocument(data).then(function(pdf) {
var pages = [];
for (var i = 0; i < pdf.numPages; i++) {
pages.push(i);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment