Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

On windows, pdf file is not moved when using chrome_dump_pdf #8

Open
cderv opened this issue Nov 11, 2018 · 1 comment · May be fixed by #9
Open

On windows, pdf file is not moved when using chrome_dump_pdf #8

cderv opened this issue Nov 11, 2018 · 1 comment · May be fixed by #9

Comments

@cderv
Copy link

cderv commented Nov 11, 2018

Following the fix in #7, I tried again to print pdf but the pdf file is not generated in the correct folder.

Currently, it is generated in dirname(chome_bin). All the part about renaming and moving does not work.
Also, the return path string is not correct.

It seems that the path to the output file is missing and we should have --print-to-pdf=<output_path>. It should generate the file correctly in the destination folder, and we do not need the renaming anymore.

I'll do a PR about that.

@cderv
Copy link
Author

cderv commented Nov 11, 2018

A quick fix for me is replacing

file.copy("output.pdf", out_fil, overwrite = overwrite)

by

file.copy(file.path(dirname(chrome_bin), "output.pdf"), out_fil, overwrite = overwrite)

However, I assume this function worked as is for you ? Is it an issue only on windows ?

I'll work on a cleaner solution with --print-to-pdf=<output_path>.

@cderv cderv linked a pull request Nov 11, 2018 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant