| Title: | Convert Local 'HTML' and 'XHTML' Files to 'PDF' |
|---|---|
| Description: | Provides functions for converting local 'HTML' and 'XHTML' files to 'PDF' using an external backend. The package includes helper functions for backend setup, file conversion, and an optional 'Tk' graphical interface. |
| Authors: | Lijin Arakkandathil Thekkathil [aut, cre] |
| Maintainer: | Lijin Arakkandathil Thekkathil <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-05-13 23:10:06 UTC |
| Source: | https://github.com/cran/html2pdfR |
Get backend config file path
backend_config_file()backend_config_file()
Path to the config file storing backend executable location.
Get default backend directory
backend_default_dir()backend_default_dir()
Path to the default backend installation directory.
Get default backend executable path
backend_default_exe()backend_default_exe()
Path to the default converter executable.
Backend release URL
backend_release_url()backend_release_url()
URL to the backend zip file hosted on GitHub Releases.
Get backend root directory
backend_root()backend_root()
Path to the package user data directory.
Convert local 'HTML' or 'XHTML' file to 'PDF'
convert_html_to_pdf(input, verbose = FALSE)convert_html_to_pdf(input, verbose = FALSE)
input |
Path to a local HTML, HTM, or XHTML file. |
verbose |
Logical; show progress messages. |
Invisibly returns the expected output PDF path.
## Not run: convert_html_to_pdf("C:/path/to/file.xhtml") ## End(Not run)## Not run: convert_html_to_pdf("C:/path/to/file.xhtml") ## End(Not run)
Find configured backend executable
find_html2pdf_backend()find_html2pdf_backend()
Path to backend executable, or an empty string if not found.
Install external backend from GitHub Releases
install_html2pdf_backend( url = backend_release_url(), ask = interactive(), overwrite = FALSE, timeout = 300, verbose = FALSE )install_html2pdf_backend( url = backend_release_url(), ask = interactive(), overwrite = FALSE, timeout = 300, verbose = FALSE )
url |
Optional URL to a backend zip file. If omitted, the default GitHub Releases URL is used. |
ask |
Logical; ask before downloading. Defaults to interactive(). |
overwrite |
Logical; overwrite an existing backend installation. |
timeout |
Download timeout in seconds. |
verbose |
Logical; show progress messages. |
Invisibly returns the installed executable path.
Launch graphical converter application
launch_html2pdf_app()launch_html2pdf_app()
Opens a 'Tk' graphical interface for file selection and conversion.
Set backend executable path
set_html2pdf_backend(path)set_html2pdf_backend(path)
path |
Path to the backend executable. |
Invisibly returns the normalized backend path.