ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Combined multiple PDF files using R Tool

AMathis
6 - Meteoroid

I am currently using the "R Tool" to read the data from a PDF (from a directory).  The problem I am having is I need this tool to read multiple PDF files.  I do not have access to the "PDF to Text" tool or that suite.  Does anyone know of a change in the below coding that could help?  Or any possible work around?

 

Coding:

#Read in the PDF file location which must
#be in a field called FullPath
data <- read.Alteryx("#1",mode="data.frame")

#Use pdf_text() funciton to return a character
#vector containing the text for each page of
#the PDF
txt <- pdftools::pdf_text(file.path(data$FullPath))

#Convert the text character vector to a data
#frame
df_txt <- data.frame(txt)

#output the data frame in stream 1
write.Alteryx(df_txt, 1)

 

Alteryx R Tool screenshot.JPG

1 REPLY 1
apathetichell
20 - Arcturus

I manage my R libraries in R Tools and can't speak to if there is a problem here - I would note that your FullPath is probably written like a PC full path ie (c:\...\) when R wants an R Path (ie c:\\..\\ or c:/../)

Labels
Top Solution Authors