View source: R/mpf_exporters.R
export_as_pdf | R Documentation |
The PDF output from this function is based on the ASCII output created with toString()
.
export_as_pdf(
x,
file,
page_type = "letter",
landscape = FALSE,
pg_width = page_dim(page_type)[if (landscape) 2 else 1],
pg_height = page_dim(page_type)[if (landscape) 1 else 2],
width = lifecycle::deprecated(),
height = lifecycle::deprecated(),
margins = c(4, 4, 4, 4),
min_siblings = 2,
font_family = "Courier",
font_size = 8,
fontsize = font_size,
lineheight = 1.2,
paginate = TRUE,
page_num = default_page_number(),
lpp = NULL,
cpp = NULL,
hsep = "-",
indent_size = 2,
rep_cols = NULL,
tf_wrap = TRUE,
max_width = NULL,
colwidths = NULL,
fontspec = font_spec(font_family, font_size, lineheight),
ttype_ok = FALSE
)
By default, pagination is performed with default cpp
and lpp
defined by specified page
dimensions and margins. User-specified lpp
and cpp
values override this, and should
be used with caution.
Title and footer materials are also word-wrapped by default (unlike when printed to the
terminal), with cpp
(as defined above) as the default max_width
.
export_as_txt()
## Not run:
tf <- tempfile(fileext = ".pdf")
export_as_pdf(basic_matrix_form(mtcars), file = tf, pg_height = 4)
tf <- tempfile(fileext = ".pdf")
export_as_pdf(basic_matrix_form(mtcars), file = tf, lpp = 8)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.