Don't exec pdfinfo if pdfMaxPages is 0

This commit is contained in:
Dan Stillman 2009-03-17 20:36:47 +00:00
parent 551c8a36a7
commit d5a092da42

View File

@ -392,6 +392,11 @@ Zotero.Fulltext = new function(){
return false;
}
var maxPages = Zotero.Prefs.get('fulltext.pdfMaxPages');
if (maxPages == 0) {
return false;
}
var item = Zotero.Items.get(itemID);
var linkMode = item.attachmentLinkMode;
// 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");
}
var maxPages = Zotero.Prefs.get('fulltext.pdfMaxPages');
Zotero.debug('Running pdftotext -enc UTF-8 -nopgbrk '
+ (allPages ? '' : '-l ' + maxPages) + ' "' + file.path + '" "'
+ cacheFile.path + '"');