Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add path argument to pdf_convert() #73

Open
dmi3kno opened this issue Dec 29, 2019 · 3 comments
Open

Add path argument to pdf_convert() #73

dmi3kno opened this issue Dec 29, 2019 · 3 comments

Comments

@dmi3kno
Copy link

dmi3kno commented Dec 29, 2019

It does not seem to be possible to specify a path for storing converted png files after converting a PDF. This, for example, works for me:

pdf_file <- "https://github.com/dmi3kno/user19-polite/raw/master/useR19%20-%20polite.pdf"
pdftools::pdf_convert(pdf_file, dpi = 300, filenames = "page_%d.%s")

While this crashes my R session:

pdftools::pdf_convert(pdf_file, dpi = 300, filenames = "~/Documents/page_%d.%s")

I would like to be able to specify where to store the files, perhaps like this:

# do not run
pdftools::pdf_convert(pdf_file, dpi = 300, path="~/Documents/", filenames = "page_%d.%s")
@jzadra
Copy link

jzadra commented May 20, 2020

Replicated.

@jzadra
Copy link

jzadra commented May 20, 2020

In addition, creating a vector of paths ahead of time also causes a segfault. So it is not the page/format placeholders (which have zero documentation by the way), but rather just having a path at all.

@prishak
Copy link

prishak commented Jul 17, 2020

how do I get the output file name equal to the input file name...what should be filename formatting for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants