| docling_figures | R Documentation |
Return a tidy tibble of the pictures Docling detected, with their captions
and page numbers. When image_dir is supplied and the document was converted
with images = TRUE, each picture is written to disk and its path returned.
docling_figures(x, image_dir = NULL, format = "png")
x |
A |
image_dir |
Optional directory to save picture images into. Created if
it does not exist. Requires |
format |
Image file format when saving, for example |
A tibble::tibble with one row per figure and columns:
figure_id — 1-based index.
caption — caption text (empty string if none).
page — page number the figure appears on (NA if unknown).
image_path — path to the saved image, or NA if not saved.
docling_convert()
## Not run:
doc <- docling_convert("paper.pdf", images = TRUE)
figs <- docling_figures(doc, image_dir = "figures")
figs$image_path
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.