How to save .pdf file with correct filename if specific characters is used in pdftools::pdf_subset(), R

455 views Asked by At

I hope someone can help me. I use pdf_subset() from pdftools package to select some pages from .pdf file and save in new .pdf file. However, there is a problem: my path/filename consists of specific characters (polish letters) which are replaced by other symbols when file saving. How to fix the problem with replacing symbols? Thanks!

library(pdftools)

# extract some pages
pdf_subset('https://cran.r-project.org/doc/manuals/r-release/R-intro.pdf',
           pages = 1:3, output = "FŁŻ_6/Siłaków.pdf")

Blad w poleceniu 'cpp_pdf_select(input, output, pages, password)': open C:\Users\PDF\FĹĹ»_6\SiĹ‚akĂłw.pdf: No such file or directory

0

There are 0 answers