Closed jorgesinval closed 3 years ago
The file you are trying to read doesn't appear to be a fillable form therefore get_fields cannot find any field data in the file. You will have better chance with something like pdftools::pdf_text
here
Can you provide me a link to see how that function can help to edit the pdf? Thanks.
For editing this won't be useful. I thought you were only trying to get the information out.
If you need to fill this form, you will have to modify it to include fillable form fields or re-create it from scratch. I believe the go to way to do that would be using adobe acrobat but I created my test files using libre office writer.
Hello @oganm, I am receiving the same error message with a fillable PDF. The PDF is available for download here. My reprex is below. Thank you for any assistance you can provide.
library(staplr)
#> Warning in fun(libname, pkgname): couldn't connect to display ":0"
template_ads <- get_fields("aia0014.pdf")
#> Error in XML::htmlParse(fields, asText = TRUE, encoding = "UTF-8") :
#> empty or no content specified
Created on 2021-03-22 by the reprex package (v0.3.0)
I am trying to get the fields of the attached pdf
subset_1_part1.pdf
using:
get_fields("path/to/pdf/example.pdf)
the following error is generated: