pagination in bookdown

Hi,

I have made an online appendix in bookdown, but now I am required to make a paginated pdf file.
So I am trying to find a way to convert a single file html into a pdf using pagedown's chrome_print():

chrome_print(
"myfile.html",
output = xfun::with_ext(input, format),
wait = 2,
browser = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe",
format = "pdf",
options = list(),
work_dir = tempfile(),
timeout = 30,
extra_args = c("--disable-gpu"),
verbose = 0,
async = FALSE,
encoding
)

I get this error message:
Error in xfun::with_ext(input, format) :
anyNA() applied to non-(list or vector) of type 'closure'.

Anyone has an idea how to proceed?

Here is my session info:
xfun::session_info()
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363), RStudio 1.2.5042

Locale:
LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
LC_NUMERIC=C LC_TIME=English_United States.1252

Package version:
AsioHeaders_1.16.1.1 base64enc_0.1.3 BH_1.72.0.3 bookdown_0.20 compiler_3.6.2 digest_0.6.23
evaluate_0.14 glue_1.4.1 graphics_3.6.2 grDevices_3.6.2 highr_0.8 htmltools_0.5.0
httpuv_1.5.4 jsonlite_1.7.0 knitr_1.29 later_1.1.0.1 magrittr_1.5 markdown_1.1
methods_3.6.2 mime_0.9 packrat_0.5.0 pagedown_0.10 processx_3.4.3 promises_1.1.1
ps_1.3.3 R6_2.4.1 Rcpp_1.0.3 rlang_0.4.5 rmarkdown_2.3 servr_0.17
stats_3.6.2 stringi_1.4.6 stringr_1.4.0 tinytex_0.24 tools_3.6.2 utils_3.6.2
websocket_1.3.1 xfun_0.15 yaml_2.2.0

As you are working with bookdown, do you try to output in pdf with pdf_book output format ?

Or do you want to print the html document you already produces to PDF ?

Hey, and thanks for replying. Due to choices made previously in my .Rmd scripts, I am committed to making an html output first. I figured the easiest way would be to subsequently print the html to pdf.

Did you use bookdown for the gitbook format or did you use html_document2 format ?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.