html_document_to_pdf.Rd
The HTML in `html` is assumed to be a complete document. Relative references are resolved with reference to `baseUri` if it is given (which could be a `file://` URI). The resulting PDF size will be controlled by page media directives within the HTML, unless explicitly given here in `maxWidthInches` and `maxHeightInches`. If the `cssSelector` parameter is given the HTML fragment at that selector will be used. In this case it is will be resized to fit within the given dimensions and shrink wrapped so that the content is smaller. If no dimensions are present this will default to A4.
html_document_to_pdf(
html,
outFile,
baseUri,
cssSelector,
xMarginInches,
yMarginInches,
maxWidthInches,
maxHeightInches,
formats,
pngDpi,
converter
)
html the html document as a string - (java expects a RCharacter)
outFile the full path of the output file - (defaulting to `tempfile('html2pdfr_')`) - (java expects a RFile)
baseUri the URI from which to interpret relative links in the html content. - (defaulting to `NA_character_`) - (java expects a RCharacter)
cssSelector the part of the page you want to convert to PDF. - (defaulting to `NA_character_`) - (java expects a RCharacter)
xMarginInches page width margins - (defaulting to `NA_real_`) - (java expects a RNumeric)
yMarginInches page height margins - (defaulting to `NA_real_`) - (java expects a RNumeric)
maxWidthInches what is the maximum allowable width? - (defaulting to `NA_real_`) - (java expects a RNumeric)
maxHeightInches what is the maximum allowable height? (if the content is larger than this then it will overflow to another page) - (defaulting to `NA_real_`) - (java expects a RNumeric)
formats If the outFile does not specify a file extension then you can do so here as "png" or "pdf" or both. - (defaulting to `c('pdf')`) - (java expects a RCharacterVector)
pngDpi the dots per inch for png outputs if requested - (defaulting to `300`) - (java expects a RNumeric)
converter (optional) a configured HTML converter, only needed if manually specifying fonts. - (defaulting to `html2pdfr::html_converter()`) - (java expects a HtmlConverter)
RCharacterVector: the filename written to (with extension '.pdf' or '.png' if outFile did not have an extension).