summaryrefslogtreecommitdiff
path: root/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/index.js')
-rw-r--r--js/index.js8
1 files changed, 4 insertions, 4 deletions
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';
}
}