Saves tables as PDF using gt::gtsave(), which requires the webshot2
package (and a Chromium installation reachable by chromote).
Usage
write_pdf(
data,
path,
...,
title = NULL,
subtitle = NULL,
source_note = NULL,
footnotes = NULL,
separate_files = TRUE,
names_separator = "__",
facade = get_tsg_facade(which = "html")
)Arguments
- data
A
tsgor data frame, or a named list of them.- path
File path for the PDF output. A
.pdfextension is added if missing. Whendatais a list andseparate_files = TRUE, this is used as a directory.- ...
Additional arguments passed to
as_gt().- title
Optional title string (overrides data attribute).
- subtitle
Optional subtitle string.
- source_note
Optional source note string.
- footnotes
Optional character vector of footnotes.
- separate_files
Logical. When
datais a list,TRUE(default) saves each table as a separate PDF file inside a subdirectory;FALSEmerges them into a single PDF (requires qpdf).- names_separator
Column name separator for spanners. Default
"__".- facade
A built-in facade name (e.g.
"booktabs"; seeget_tsg_facade()), the path to a.yamlor.jsonfacade file, or a facade list. A built-in facade looks the same in every output format. Keys missing from it fall back to this format's default facade; settings added withadd_facade()take precedence over it.