I get following error when I run the finishAndShowPdf function in this way
pdff <- kwb.utils:::preparePdfIf(to.pdf = TRUE)
# some code is here in between
kwb.utils:::finishAndShowPdf(to.pdf=TRUE, pdff)
Error in hsShowPdf(PDF, ...) : unused argument (to.pdf = TRUE)
Version of kwb.utils is 0.13.0