Extract data from PDF with Password using R Tool (pdftools)
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
RichardAlt
8 - Asteroid
‎10-12-2021
11:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All,
How to extract data from PDF file with password. I've installed PDFInput Tool on my designer I have no problem when the PDF file is not password protected.
This is the default R Code in PDF Input.
# read in the PDF file location which must
# be in a field called FullPath
File <- read.Alteryx("#1", mode="data.frame")
# Use pdf_text() function to return a character vector
# containing the text for each page of the PDF
Data <- pdftools::pdf_text(file.path(File$FullPath))
# convert the character vector to a data frame
df_Data <- data.frame(Data)
# output the data frame in steam 1
write.Alteryx(df_Data, 1)
1 REPLY 1
Alteryx
‎10-13-2021
07:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That tool from the gallery uses the pdftools R package. If you look at their documentation you will see that you can pass owner/user passwords in the command: https://cran.r-project.org/web/packages/pdftools/pdftools.pdf
