make_pdf: Generate a pdf from an html file

Description Usage Arguments Details Value

Description

This function is a helper to use WeasyPrint or Prince in order to convert an HTML file to PDF.

Usage

1
2
make_pdf(file, engine = c("weasyprint", "prince"), engine_opts = NULL,
  pdf_file = gsub("html?$", "pdf", file))

Arguments

file

An HTML file path.

engine

A PDF engine.

engine_opts

A character vector of command-line arguments to be passed to engine.

pdf_file

Path to the PDF output file. By default, it is under the same directory as the input file and also has the same base name.

Details

The presentational hints option is always enabled for Weasyprint. The javascript option is always enabled for Prince.

Value

A character string of the path of the PDF output file (i.e., the value of the pdf_file argument).


RLesur/weasydoc documentation built on May 21, 2019, 9:19 a.m.