Open cderv opened 5 years ago
A quick fix for me is replacing https://github.com/hrbrmstr/decapitated/blob/842cc7244cff150d6ca79fcd5fc0df67e4f3d74e/R/chrome-pdf.r#L97 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>
.
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.