pdf_clean() copies input pdf file to output and removes temporary pdf files with rm_temp_pdfs(exclude = output).
Value
output pdf file name invisibly.
As a side effect copies input to output and removes temporary pdf files.
Examples
if (FALSE) # May delete user files in `tempdir()`
f1 <- pdf_create_blank()
f2 <- pdf_compress(f1)
#> Error: object 'f1' not found
f3 <- pdf_subset(f2, pages = 1L)
#> Error: object 'f2' not found
ls_temp_pdfs()
#> character(0)
pdf_clean(f3, "output.pdf")
#> Error: object 'f3' not found
ls_temp_pdfs()
#> character(0)
unlink("output.pdf")
# \dontrun{}