diff --git a/package.json b/package.json index 5257f0d..1d81d88 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,6 @@ "url": "https://github.com/jzillmann/pdf-to-markdown" }, "dependencies": { - "keen-ui": "^0.8.9", "pdfjs-dist": "^1.6.317", "vue": "^2.0.5", "vue-material": "^0.3.3" diff --git a/src/components/Hello.vue b/src/components/Hello.vue index fbb10ba..d0b7cbb 100644 --- a/src/components/Hello.vue +++ b/src/components/Hello.vue @@ -29,6 +29,8 @@ h1, h2 { font-weight: normal; } +textarea { font-size: 18px; } + ul { list-style-type: none; padding: 0; diff --git a/src/store.js b/src/store.js index 7134505..fc16f8c 100644 --- a/src/store.js +++ b/src/store.js @@ -28,20 +28,23 @@ export default { var text = ''; var line; var lineY; + // console.debug("Page " + rawPage.index + "-------"); rawPage.textItems.forEach(textItem => { + console.debug(textItem); + const yRounded = Math.round(textItem.y); if (!line) { - // console.debug("First line: "+item.str); - lineY = textItem.y; + // console.debug("First line: " + textItem.text); + lineY = yRounded; line = textItem.text; } else { - if (textItem.y === lineY) { - //console.debug("Add to line: "+line +" / "+ item.str); + if (yRounded === lineY) { + // console.debug("Add to line: " + line + " / " + textItem.text); line += textItem.text; } else { - // console.debug("Start line: "+line+ " / " +item.str); + // console.debug("Start line: " + line + " / " + textItem.text); text += line + '\n'; line = textItem.text; - lineY = textItem.y; + lineY = yRounded; } } });