mirror of
https://github.com/Yetangitu/owncloud-apps.git
synced 2025-10-02 14:49:17 +02:00
files_reader: experimental PDF support, Work In Progress
This commit is contained in:
parent
9865f94e70
commit
ed0d8ae717
27 changed files with 3649 additions and 2 deletions
|
@ -94,6 +94,9 @@ document.onreadystatechange = function () {
|
|||
case 'application/x-cbr':
|
||||
renderCbr(file, options);
|
||||
break;
|
||||
case 'application/pdf':
|
||||
renderPdf(file, options);
|
||||
break;
|
||||
default:
|
||||
console.log(type + ' is not supported by Reader');
|
||||
}
|
||||
|
@ -134,6 +137,14 @@ document.onreadystatechange = function () {
|
|||
|
||||
var reader = cbReader(file, options);
|
||||
}
|
||||
|
||||
// start pdf.js renderer
|
||||
function renderPdf(file, options) {
|
||||
PDFJS.filePath = "vendor/pdfjs/";
|
||||
PDFJS.workerSrc = options.session.basePath + 'vendor/pdfjs/lib/pdf.worker.js';
|
||||
|
||||
var reader = pdfReader(file, options);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue