diff --git a/chrome/content/zotero/xpcom/fulltext.js b/chrome/content/zotero/xpcom/fulltext.js index fd88aa622..a6abf84ff 100644 --- 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 + '"');