From 83b02062f91d616a01a5daa035fbca7d097adc05 Mon Sep 17 00:00:00 2001 From: schneefux Date: Tue, 10 Jun 2014 15:24:45 +0200 Subject: aktualisiere PDF.js --- js/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/index.js') diff --git a/js/index.js b/js/index.js index a22e96b..ddedc8f 100644 --- a/js/index.js +++ b/js/index.js @@ -598,12 +598,12 @@ function renderPage($div, pdf, pageNumber, callback){ var pageText = ""; var lastBlock = null; - for(j = 0; j < textContent.length; j++){ - var block = textContent[j]; + for(j = 0; j < textContent.items.length; j++){ + var block = textContent.items[j]; if(lastBlock !== null && lastBlock.str[lastBlock.str.length - 1] !== ' '){ - if(block.x < lastBlock.x){ + if(block.transform[4] < lastBlock.transform[4]){ pageText += '\n'; - }else if(lastBlock.y !== block.y && (lastBlock.str.match(/^(\s?[a-zA-Z])$|^(.+\s[a-zA-Z])$/) === null )){ + }else if(lastBlock.transform[5] !== block.transform[5] && (lastBlock.str.match(/^(\s?[a-zA-Z])$|^(.+\s[a-zA-Z])$/) === null )){ pageText += '\n'; } } -- cgit v1.3.1