Use the bundled PDF tools

This commit is contained in:
Martynas Bagdonas 2018-01-15 19:09:38 +02:00
parent e3dee4dee7
commit 0d5ea8520a
15 changed files with 42 additions and 954 deletions

View file

@ -473,27 +473,6 @@ function getPromiseError(promise) {
return promise.thenReturn(false).catch(e => e);
}
/**
* Ensures that the PDF tools are installed, or installs them if not.
*
* @return {Promise}
*/
var installPDFTools = Zotero.Promise.coroutine(function* () {
if(Zotero.Fulltext.pdfConverterIsRegistered() && Zotero.Fulltext.pdfInfoIsRegistered()) {
return;
}
var version = yield Zotero.Fulltext.getLatestPDFToolsVersion();
yield Zotero.Fulltext.downloadPDFTool('info', version);
yield Zotero.Fulltext.downloadPDFTool('converter', version);
});
/**
* @return {Promise}
*/
function uninstallPDFTools() {
return Zotero.Fulltext.uninstallPDFTools();
}
/**
* Returns the nsIFile corresponding to the test data directory
* (i.e., test/tests/data)