> ## Documentation Index
> Fetch the complete documentation index at: https://www.adaline.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use PDFs in prompts

> Include PDF documents as context in your prompts for document analysis and extraction

PDFs bring rich document context into your prompts, enabling tasks like summarization, information extraction, contract analysis, and report generation. Adaline lets you attach PDF files directly to messages and supports PDF variables for dynamic document processing.

<Warning>
  PDF inputs are currently supported only with **Google's models** (Gemini). Make sure you have a Google provider configured and a compatible model selected.
</Warning>

<Note>
  Keep in mind that large PDFs consume significant context window tokens. For best results, use concise documents or extract the relevant sections before attaching. The model processes the full document content, so multi-hundred-page PDFs may impact latency and cost.
</Note>

## Add a PDF to a message

<Steps>
  <Step title="Open the PDF picker">
    Navigate to the message block and click the PDF button <Icon icon="file-plus" iconType="solid" />. You can upload a PDF from your computer, paste a URL, or retrieve it from a variable.

    <img src="https://mintcdn.com/adaline/Um_T8BffW4hfcoYD/images/iterate/add-pdf.png?fit=max&auto=format&n=Um_T8BffW4hfcoYD&q=85&s=7930e2fa57223a3540269651d463bbfe" alt="Attaching PDFs in Adaline's messages" title="Attaching PDFs in Adaline's messages" style={{ width: "100%" }} width="1423" height="601" data-path="images/iterate/add-pdf.png" />
  </Step>

  <Step title="Run the prompt">
    Once the PDF is attached, run the prompt in the [Playground](/docs/iterate/run-prompts-in-playground). The model will process the document content alongside your text instructions.

    <img src="https://mintcdn.com/adaline/-Bsa4BuK4fSdmy67/images/iterate/run-prompt-with-pdf.png?fit=max&auto=format&n=-Bsa4BuK4fSdmy67&q=85&s=cef218b0f4152c37f82f8ca962f959e2" alt="Running a prompt with a PDF attachment" title="Running a prompt with a PDF attachment" style={{ width: "100%" }} width="1410" height="621" data-path="images/iterate/run-prompt-with-pdf.png" />
  </Step>
</Steps>

## Use PDF variables

PDF variables let you dynamically swap documents at runtime, which is essential for document processing workflows where you need to run the same analysis across many files.

<Steps>
  <Step title="Create a PDF variable">
    Click the PDF button <Icon icon="file-plus" iconType="solid" /> in the message block and select **From Variable**.

    <img src="https://mintcdn.com/adaline/-Bsa4BuK4fSdmy67/images/iterate/insert-pdf-variable.png?fit=max&auto=format&n=-Bsa4BuK4fSdmy67&q=85&s=5b86edc969ef3610c6264423cdac8f1d" alt="Adding a PDF variable" title="Adding a PDF variable" style={{ width: "100%" }} width="1224" height="524" data-path="images/iterate/insert-pdf-variable.png" />
  </Step>

  <Step title="Name and attach the variable">
    Define a descriptive name for the PDF variable and attach it to the message.

    <img src="https://mintcdn.com/adaline/-Bsa4BuK4fSdmy67/images/iterate/rename-pdf-variable.png?fit=max&auto=format&n=-Bsa4BuK4fSdmy67&q=85&s=2976e50c1094dd8a17d7eaea9a5984ec" alt="Naming a PDF variable" title="Naming a PDF variable" style={{ width: "100%" }} width="1080" height="308" data-path="images/iterate/rename-pdf-variable.png" />
  </Step>

  <Step title="Set the variable value">
    In the Variable Editor, attach the actual PDF to the variable. You can paste a URL, provide a base64-encoded string, or upload a file from your computer.

    <img src="https://mintcdn.com/adaline/-Bsa4BuK4fSdmy67/images/iterate/load-pdf.png?fit=max&auto=format&n=-Bsa4BuK4fSdmy67&q=85&s=072394b4f8c8f2238fc80be33c4f040c" alt="Setting the PDF variable value" title="Setting the PDF variable value" style={{ width: "100%" }} width="1479" height="387" data-path="images/iterate/load-pdf.png" />
  </Step>
</Steps>

## Use cases

* **Document summarization** — Extract key points and generate concise summaries from lengthy reports.
* **Information extraction** — Pull specific data points, dates, or figures from structured documents.
* **Contract analysis** — Review legal documents and flag key terms, obligations, or risks.
* **Report generation** — Process raw data reports and generate formatted insights.
* **Compliance review** — Check documents against a set of rules or guidelines.

## Next steps

<CardGroup cols={2}>
  <Card title="Use Images in Prompts" icon="image" href="/docs/iterate/use-images-in-prompt">
    Add image inputs for multi-modal prompts.
  </Card>

  <Card title="Use Variables in Prompts" icon="braces" href="/docs/iterate/use-variables-in-prompt">
    Learn about all variable types, including PDF variables.
  </Card>
</CardGroup>
