% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preprocessing.R
\name{extract_pdf_multimodal}
\alias{extract_pdf_multimodal}
\title{Extract PDF with Multimodal Analysis}
\usage{
extract_pdf_multimodal(
  file_path,
  vision_provider = "gemini",
  vision_model = NULL,
  api_key = NULL,
  describe_images = TRUE,
  envname = "textanalysisr-env"
)
}
\arguments{
\item{file_path}{Character string path to PDF file}

\item{vision_provider}{Character: "openai" or "gemini" (default)}

\item{vision_model}{Character: Model name
\itemize{
\item For OpenAI: "gpt-4.1", "gpt-4.1-mini"
\item For Gemini: "gemini-2.5-flash", "gemini-2.5-pro"
}}

\item{api_key}{Character: API key (required for openai/gemini providers)}

\item{describe_images}{Logical: Convert page images to text descriptions (default: TRUE)}

\item{envname}{Character: Kept for backward compatibility, ignored}
}
\value{
List with:
\itemize{
\item success: Logical
\item combined_text: Character string with all content for text analysis
\item text_content: List of text chunks
\item image_descriptions: List of image descriptions
\item num_images: Integer count of described pages
\item vision_provider: Character indicating provider used
\item message: Character status message
}
}
\description{
Extract both text and visual content from PDFs using R-native pdftools
and vision LLM APIs. No Python required.
}
\details{
\strong{Workflow:}
\enumerate{
\item Extracts text using pdftools (R-native)
\item Renders each page as an image
\item Sends sparse-text pages to vision LLM for description
\item Merges text + descriptions into a single text corpus
}
}
\concept{pdf}
\keyword{internal}
