Arguments
- x
docoratorobject- display_loc
optional path to save the output pdf to
- keep_html
Whether to keep the intermediate HTML file. If
TRUEthe HTML is saved alongside the PDF with the same base name. IfFALSE(default), HTML is deleted after conversion.- wait
Number of seconds to wait after page navigation before printing. Increase if the table takes time to render. Defaults to
3.
Examples
gt::gtcars |>
dplyr::slice_head(n = 10) |>
dplyr::select(mfr, model, year, msrp) |>
gt::gt() |>
as_docorator(
display_name = "output",
header = fancyhead(
fancyrow(left = "Study ABC-123", right = "Draft"),
fancyrow(center = "Table 1: Vehicle Summary")
),
footer = fancyfoot(
fancyrow(left = "Source: gtcars"),
fancyrow(left = "program.R", right = format(Sys.Date(), "%d%b%Y"))
)
) |>
render_pdf_html()