Don't exec pdfinfo if pdfMaxPages is 0
This commit is contained in:
parent
551c8a36a7
commit
d5a092da42
|
@ -392,6 +392,11 @@ Zotero.Fulltext = new function(){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var maxPages = Zotero.Prefs.get('fulltext.pdfMaxPages');
|
||||||
|
if (maxPages == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var item = Zotero.Items.get(itemID);
|
var item = Zotero.Items.get(itemID);
|
||||||
var linkMode = item.attachmentLinkMode;
|
var linkMode = item.attachmentLinkMode;
|
||||||
// If file is stored outside of Zotero, create a directory for the item
|
// If file is stored outside of Zotero, create a directory for the item
|
||||||
|
@ -426,8 +431,6 @@ Zotero.Fulltext = new function(){
|
||||||
Zotero.debug(this.pdfInfoName + " is not available");
|
Zotero.debug(this.pdfInfoName + " is not available");
|
||||||
}
|
}
|
||||||
|
|
||||||
var maxPages = Zotero.Prefs.get('fulltext.pdfMaxPages');
|
|
||||||
|
|
||||||
Zotero.debug('Running pdftotext -enc UTF-8 -nopgbrk '
|
Zotero.debug('Running pdftotext -enc UTF-8 -nopgbrk '
|
||||||
+ (allPages ? '' : '-l ' + maxPages) + ' "' + file.path + '" "'
|
+ (allPages ? '' : '-l ' + maxPages) + ' "' + file.path + '" "'
|
||||||
+ cacheFile.path + '"');
|
+ cacheFile.path + '"');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user