Search This Blog

Monday, June 25, 2018

Reading and Storing the Text from PDF - Using SQL Server 2017 & R





How to Read Text from PDF - Using SQL Server 2017 & R

Insert into tbl_PDF
EXECUTE sp_execute_external_script
@language = N'R',
@script = N' 

# load packages (Pdftools is the R package whicn needs to be downloaded and loaded)
library(pdftools)

# Read PDF
text <- pdf_text("C://suresh//mybook.pdf")

# Return Output
OutputDataSet = data.frame(text)',
@output_data_1_name=N'OutputDataSet'

select * from tbl_PDF



     

No comments: