| pdf_page_to_image | R Documentation |
Renders one page of a PDF to a PNG file. Uses a temporary directory internally to avoid pdftools filename template issues.
pdf_page_to_image(pdf_path, page_index, image_dir, dpi = 300, overwrite = TRUE)
pdf_path |
Path to the PDF file. |
page_index |
Page number to render (1-indexed). |
image_dir |
Directory to save the PNG image. |
dpi |
Resolution in dots per inch (default: 300). |
overwrite |
Logical; overwrite an existing rendered page. Set to
|
Path to the saved PNG image.
## Not run:
img <- pdf_page_to_image("document.pdf", page_index = 1, image_dir = "pages")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.