`getRawTextContent` does not returns words' pieces in proper coordinate order
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Comienza localizando getRawTextContent e inspeccionando cómo se ordenan los elementos de bidiTexts y cómo se gestionan sus coordenadas y. Reproduce la secuencia indicada con el PDF de ejemplo o un fixture equivalente; la tarea estará terminada cuando el texto extraído conserve el orden de coordenadas previsto para los grupos de caracteres invertidos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hey,
getRawTextContent seems to assume that word pieces in the bidiTexts array appear in ascending order of their y coordinate but they probably do appear as they are being added by the PDF rendering software. I have a file where a line of text looking on screen like
Some label 12.3 4455
appears in that array as
Some label | 3 | . | 2 | 1 | 5 | 5 | 4 | 4
that is, the character groups are properly following one after the other but the order of individual characters within the groups is reversed. And getRawTextContent() naively returns
Some label 3.21 5544
The y number of each item correctly shows the correct position but the code is not considering that (it only checks the absolute y difference).
So I wonder if this has a known solution before I go and change the code myself?
Cheers for the nice work.
- Lenguaje dominante
- Java
- Estrellas
- 2.2k
- Forks
- 396
- Merge medio
- 9 d 19 h
- PR fusionados (30 d)
- 3
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modesty/pdf2json
-
getRawTextContent() returns the lines of every page in reverse order (bottom to top) since 4.0.3Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
-
many warnings in version 4.0.0Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
help-wanted: type3-font not-supported
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
Todos los issues de modesty/pdf2json
Issues similares
-
bug subsystem:agent-harness triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ShaftHQ/SHAFT_ENGINE#7797 ·
Los mantenedores suelen responder en 1 día
-
ARM: Q flag should be stickyAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
NationalSecurityAgency/ghidra#10155 ·
Los mantenedores suelen responder en 2 días
-
area:data coverage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 67/100
reacher-z/Awesome-CUA#4864 ·
Los mantenedores suelen responder en 19 días
-
bug web-ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
jenkinsci/jenkins#27705 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
"item-tooltip-keyboard-fix" crashes the game when opening the Items tab of the statistics menuAbiertomod bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
elmital/FixMCStats#65 · 3 comentarios ·