Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdftools::pdf_text not recognizing all spaces #100

Open
JackoBill opened this issue Nov 8, 2021 · 0 comments
Open

pdftools::pdf_text not recognizing all spaces #100

JackoBill opened this issue Nov 8, 2021 · 0 comments

Comments

@JackoBill
Copy link

I'm trying to extract biathlon results from pdf files but a few of them have proven to be difficult: some white spaces seem to disappear. Here's an example:

# install.packages("pdftools")
library(pdftools)

test<-pdf_text("https://ibu.blob.core.windows.net/docs/2021/BT/SWRL/CP01/SMIN/C77A_v1.pdf")
test[[1]]

Here's a piece of the original pdf:

stack_ibu

For example, the green one converts to "70 0" as it should but the red one turns into "70". One can check that both of them have a space by copying and pasting them to text editor. A quick look suggests the problem occurs when the first number (rank of shooting time) has only one digit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant