depending on the context return the correct format for a document. The basic output here is to use HTML as an output if possible and convert it to an image or a PDF that can then be included into a latex document for example.
Usage
.hux_save_as(
hux,
filename,
size = std_size$full,
maxWidth = size$width,
maxHeight = size$height,
aspectRatio = maxWidth/maxHeight,
formats = c("html", "docx"),
defaultFontSize = 8,
sheetname = fs::path_ext_remove(fs::path_file(filename)),
pdfConverter = .print_html_with_chrome,
webfontFinder = ~return(list())
)
Arguments
- hux
the huxtable to save
- filename
the filename, which may omit the extension
- size
a
std_size
list entry- maxWidth
or the maximum width in inches
- maxHeight
and either the maximum height in inches
- aspectRatio
or the minimum allowed aspect ratio
- formats
if the extension is omitted, all the formats described here will be saved. Currently supported outputs are "html","png","pdf","docx","xlsx"
- defaultFontSize
the default font size
- sheetname
if saving as an xlsx file.
- pdfConverter
a function that takes an HTML fragment and returns a pdf file.
- webfontFinder
a function that takes a set of font families and returns a css webfonts directive