Experimental export to the RTF format.
export_as_rtf(
tt,
file = NULL,
colwidths = propose_column_widths(matrix_form(tt, TRUE)),
page_type = "letter",
pg_width = page_dim(page_type)[if (landscape) 2 else 1],
pg_height = page_dim(page_type)[if (landscape) 1 else 2],
landscape = FALSE,
margins = c(bottom = 4, left = 4, top = 4, right = 4),
font_size = 8,
font_family = "Courier",
...
)
TableTree (or related class). A TableTree object representing a populated table.
character(1). File to write.
numeric vector. Column widths for use with vertical pagination.
character(1). Name of a page type. See
page_types
. Ignored when pg_width
and pg_height
are set directly.
numeric(1). Page width in inches.
numeric(1). Page height in inches.
logical(1). Should the dimensions of page_type
be inverted for landscape? Defaults to FALSE
, ignored when
pg_width
and pg_height
are set directly.
A numeric vector interpreted in the same way
as par(mar)
in base graphics.
numeric(1). Font size, defaults to 12.
character(1). Name of a font family. An error will be thrown if the family named is not monospaced. Defaults to Courier.
Passed directly to paginate_table
RTF export occurs by via the following steps
the table is paginated to the page size (Vertically and horizontally)
Each separate page is converted to a MatrixPrintForm and from there to RTF-encoded text
Separate rtfs text chunks are combined and written out as a single RTF file
Conversion of MatrixPrintForm
objects to RTF is done via formatters::mpf_to_rtf()
.