0

I am converting pdf to data frame using extract_table function of tabulizer package but keeps on getting error of no lines available. I ran the code on 3 pdf files. I ran perfectly for first pdf but gave error on remaining 2 files.

agri_table <- extract_tables("kp_2018-19.pdf",
                             output = "data.frame",
                             pages = c(1), 
                             area = list(
                               c(172.1,77.5,693,536)
                             ),
                             guess = FALSE
                             
)

The error occur in first line of code. Please help.

Phil
  • 7,287
  • 3
  • 36
  • 66
  • Is there anything on the first page of that document? The error seems to suggest there isn't. – Phil Sep 22 '21 at 14:21
  • Yes. All pages of the document have tables – Ali Inayat Sep 22 '21 at 14:30
  • Difficult to help further without a reproducible example. I would just point that your code indicates to only take the first page. – Phil Sep 22 '21 at 14:31
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 26 '21 at 13:06
  • problem have been solved. I was trying to get table from the print document but when I loaded the original document and extracted table from there the code worked fine. – Ali Inayat Sep 28 '21 at 06:01

0 Answers0