| batch_pdf_to_markdown_with_paddle | R Documentation |
Processes all PDF files in a directory, converting each to Markdown using
pdf_to_markdown_with_paddle. Requires the pdftools
package.
batch_pdf_to_markdown_with_paddle(
pdf_dir = ".",
output_root = file.path(pdf_dir, "paddle_output"),
dpi = 300,
batch_trigger = 3,
workers = 1,
resume = TRUE,
token = "",
job_url = "",
model = "",
poll_interval = 5,
max_wait_seconds = 1800,
timeout = 600
)
pdf_dir |
Directory containing PDF files (default: current directory). |
output_root |
Root directory for output (default:
|
dpi |
Image resolution for rendering (default: 300). |
batch_trigger |
Number of pages to render before starting OCR (default: 3). |
workers |
Maximum number of OCR jobs submitted concurrently. |
resume |
Logical; reuse completed work from interrupted runs. |
token |
PaddleOCR API token. |
job_url |
PaddleOCR API endpoint. |
model |
Model name. |
poll_interval |
Polling interval in seconds. |
max_wait_seconds |
Maximum wait time per job. |
timeout |
HTTP timeout. |
A named list of results (one per PDF). Failed conversions return a
list with an error element.
## Not run:
results <- batch_pdf_to_markdown_with_paddle(
pdf_dir = "papers",
output_root = "papers/paddle_output"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.