Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d56a2cb4f | ||
|
|
ef23ee0ade | ||
|
|
af31f52b47 | ||
|
|
b5152112ee | ||
|
|
85ea4ef455 |
@@ -6,7 +6,7 @@ plugins {
|
||||
description = "layoutparser-service-processor"
|
||||
|
||||
val jacksonVersion = "2.15.2"
|
||||
val pdfBoxVersion = "3.0.0"
|
||||
val pdfBoxVersion = "3.0.4"
|
||||
|
||||
|
||||
dependencies {
|
||||
|
||||
+4
-1
@@ -24,7 +24,7 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = false)
|
||||
public class Line extends TextBoundingBox {
|
||||
|
||||
private static final double WORD_DISTANCE_MULTIPLIER = 0.18;
|
||||
private static final double WORD_DISTANCE_MULTIPLIER = 0.17;
|
||||
|
||||
@EqualsAndHashCode.Include
|
||||
private final double x0;
|
||||
@@ -157,6 +157,9 @@ public class Line extends TextBoundingBox {
|
||||
|
||||
private void computeWords(List<Character> characters, double wordSpacing) {
|
||||
|
||||
// Imo, the width of space should be scaled with the font size, but it only depends on the median distance between horizontal neighbours.
|
||||
// If there are large differences in fontsize on a page, this might lead to missing spaces for the smaller fonts and too many for larger fonts.
|
||||
// I've just now changed the scaling factor. If you come across this comment with missing whitespaces again, try scaling the fontsize instead of simply changing the factor again.
|
||||
Word word = new Word();
|
||||
Character previous = null;
|
||||
for (Character current : characters) {
|
||||
|
||||
@@ -22,7 +22,7 @@ configurations {
|
||||
|
||||
|
||||
val jacksonVersion = "2.15.2"
|
||||
val pdfBoxVersion = "3.0.0"
|
||||
val pdfBoxVersion = "3.0.4"
|
||||
val springBootStarterVersion = "3.1.5"
|
||||
|
||||
dependencies {
|
||||
@@ -39,6 +39,7 @@ dependencies {
|
||||
implementation("org.springframework.cloud:spring-cloud-starter-openfeign:4.0.4")
|
||||
implementation("net.logstash.logback:logstash-logback-encoder:7.4")
|
||||
implementation("ch.qos.logback:logback-classic")
|
||||
api("com.iqser.red.commons:metric-commons:2.3.0")
|
||||
|
||||
implementation("com.pdftron:PDFNet:10.11.0")
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ plugins {
|
||||
|
||||
description = "Library for adding/removing layers in the viewer document"
|
||||
|
||||
var pdfBoxVersion = "3.0.0"
|
||||
var pdfBoxVersion = "3.0.4"
|
||||
|
||||
dependencies {
|
||||
implementation("org.apache.pdfbox:pdfbox:${pdfBoxVersion}")
|
||||
|
||||
Reference in New Issue
Block a user