export_as_pdf | R Documentation |
The PDF output is based on the ASCII output created with toString
export_as_pdf(
tt,
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 = NULL,
height = NULL,
margins = c(4, 4, 4, 4),
font_family = "Courier",
fontsize = 8,
font_size = fontsize,
paginate = TRUE,
lpp = NULL,
cpp = NULL,
hsep = "-",
indent_size = 2,
tf_wrap = TRUE,
max_width = NULL,
colwidths = propose_column_widths(matrix_form(tt, TRUE)),
...
)
tt |
|
file |
file to write, must have |
page_type |
character(1). Name of a page type. See
|
landscape |
logical(1). Should the dimensions of |
pg_width |
numeric(1). Page width in inches. |
pg_height |
numeric(1). Page height in inches. |
width |
Deprecated, please use |
height |
Deprecated, please use |
margins |
numeric(4). The number of lines/characters of margin on the bottom, left, top, and right sides of the page. |
font_family |
character(1). Name of a font family. An error will be thrown if the family named is not monospaced. Defaults to Courier. |
fontsize |
Deprecated, please use |
font_size |
numeric(1). Font size, defaults to 12. |
paginate |
logical(1). Whether pagination should be performed,
defaults to |
lpp |
numeric(1) or NULL. Lines per page. if NA (the default,
this is calculated automatically based on the specified page
size). |
cpp |
numeric(1) or NULL. Width in characters per page. if NA (the default,
this is calculated automatically based on the specified page
size). |
hsep |
character(1). Characters to repeat to create header/body separator line. |
indent_size |
numeric(1). Indent size in characters. Ignored
when |
tf_wrap |
logical(1). Should the texts for title, subtitle, and footnotes be wrapped? |
max_width |
integer(1), character(1) or NULL. Width that title
and footer (including footnotes) materials should be
word-wrapped to. If NULL, it is set to the current print width
of the session ( |
colwidths |
numeric vector. Column widths (in characters) for use with vertical pagination. |
... |
arguments passed on to |
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
.
formatters::export_as_txt()
lyt <- basic_table() %>%
split_cols_by("ARM") %>%
analyze(c("AGE", "BMRKR2", "COUNTRY"))
tbl <- build_table(lyt, ex_adsl)
## Not run:
tf <- tempfile(fileext = ".pdf")
export_as_pdf(tbl, file = tf, pg_height = 4)
tf <- tempfile(fileext = ".pdf")
export_as_pdf(tbl, 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.