commit d5a092da426bb90d699505a64290df19acb32abc
parent 551c8a36a7d2017c74c8aaf83d674f8588f32505
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 17 Mar 2009 20:36:47 +0000
Don't exec pdfinfo if pdfMaxPages is 0
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/fulltext.js b/chrome/content/zotero/xpcom/fulltext.js
@@ -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 + '"');