url_to_pdf.Rd
The URL is assumed to be a complete document. 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.
url_to_pdf(
htmlUrl,
outFile,
cssSelector,
xMarginInches,
yMarginInches,
maxWidthInches,
maxHeightInches,
formats,
pngDpi,
converter
)
htmlUrl the URL - (java expects a RCharacter)
outFile the full path of the output file - (defaulting to `tempfile('html2pdfr_')`) - (java expects a RFile)
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(s) written to (with extension '.pdf' or '.png' if outFile did not have an extension).