Skip to content
Build Perch
Browse guides

How to read a PDF's contents with AI

Short answer: Just ask: pointing the AI at a PDF in your workspace and asking about it is enough. read_file pulls out the full text automatically, and reading/searching files is on by default in every built-in mode except Chat Only, so there’s nothing to turn on first. The one nuance is keyword search: it only looks inside PDF and Office content when you ask it to (see step 2).

Steps

  1. Put the PDF in your workspace, then ask the AI about it directly: for example, “What does contract.pdf say about the termination clause?” read_file extracts the document’s full text and answers from that.
  2. To search one phrase across many files at once, including PDFs, ask something like “search all my PDFs for Q3 revenue.” The AI reaches inside PDF (and Word/Excel/PowerPoint) content with find_text when it decides document content should be included. Searching inside PDF and Office content is off by default for a plain keyword search, so ask explicitly (for example, “include the PDFs”) if a search seems to skip them.
  3. For a fuzzier “find the PDF about X” without an exact phrase, ask the AI to search by meaning. PDFs are indexed for semantic search by default, alongside your other files.

Notes & gotchas

  • Scanned or image-only PDFs have no text layer. On Windows, Build Perch reads them with the OCR engine built into Windows, entirely on your machine: read_file labels those pages “(OCR)”, tells the AI to verify exact wording against the page images, and the same recognized text is what find_text and the semantic index see. Pages scanned sideways (and most upside-down ones) are read again in the other orientations, and the rows of a detected table come back tab-separated. When OCR reads a page poorly (nothing, a handful of words, or noise) and the chat model can see images, read_file also sends that page as an image in the same call, up to 4 pages per read, and says which pages it sent and why; “Scanned PDF pages” under Chat Configuration → Settings → Scanned Documents switches this to text only or to always sending the pages. With Zero Data Retention on (the default), the “when OCR reads poorly” option sends nothing; choose “Always send page images” if you want them sent. A vision-capable model can also look at any page itself (view_image on a PDF inside the workspace, up to 10 pages per call; read_file names the first batch to ask for). A scanned PDF attached to a chat message gets the same treatment on send: its text is inlined, and on a vision-capable model the pages OCR read poorly ride along as images. Image files read the same way: read_file on a screenshot or a photo of a document (PNG, JPG, GIF, BMP, TIFF, and WebP where Windows has the codec) returns the text Windows OCR recognized on this device; for PNG, JPG, GIF and WebP, the image itself can be sent to a vision-capable model when OCR read it poorly (under the same Scanned PDF pages setting and Zero Data Retention rule), and an image attached to a chat on a model that cannot see images is inlined as recognized text. If no installed Windows OCR language matches any of your Windows profile languages, read_file says so, lists the languages that are installed, and names the page-image route instead. OCR is bounded per document (20 pages, about 20 seconds); pages past that are listed at the top of the result so the AI can view them with view_image instead. PDFs over 128 MB are not read at all; pull the pages you need into a smaller file with extract_pdf_pages first. Nothing is sent to a cloud OCR service.
  • Password-protected PDFs aren’t supported: text extraction and page editing both fail.
  • read_file labels each page --- Page N --- (with “(OCR)” on pages the text came from OCR), so the AI can cite a page and line text up with the page images. For a long document, the AI reads a window at a time with the pages argument (pages:"40-55"), and inspect_pdf lists the PDF’s bookmarks with the page each one opens: the document’s own table of contents for choosing those ranges. find_text hits inside a PDF carry the page number (page=N).
  • The AI can rearrange a PDF’s pages in place (delete, rotate, reorder), stamp a one-line label or page counter onto pages, combine PDFs into one, and pull chosen pages into a new file. What it can’t do is rewrite the text already on a page: to change a generated PDF’s content, edit the source document and re-export.
  • A very large PDF can be skipped from the semantic index if its extracted text exceeds the size cap (2 MB by default; raise it in Settings, under Workspace Indexing, with “Max file size to index”); the Activity window flags files it skipped this way.