Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MuhammadSalmanAhmad/rag-pdf-highlighter/llms.txt
Use this file to discover all available pages before exploring further.
rag_pdf_highlighter.utils.pdf_helpers exposes three public functions. These can be called directly in any Python application without running the FastAPI server.
highlight_chunks_in_pdf
pdf_path, applies highlights to every chunk in documents, saves the annotated copy to a new temp file, and returns its path.
Absolute or relative path to the local PDF file.
List of
langchain_core.documents.Document objects. Each must have page_content (string) and metadata["page"] (zero-indexed integer).NoDocumentsErrorifdocumentsis emptyPDFNotFoundErrorifpdf_pathdoes not existHighlightErroras base for all other errors
The output file is written to a system temp directory. Call
cleanup_file(output_path) when done.download_pdf
httpx and writes it to a temp file. Returns the path to the temp file.
URL of the PDF to download. HTTP 60s timeout.
PDFDownloadErrorif the download fails (network error, non-2xx response, etc.)
This is an async function — call it with
await inside an async context.cleanup_file
path if it exists. Does nothing if the file is already gone.
Absolute path to the file to delete.