Skip to content
Lucerna Law

Practice guides

AI PDF Chat for Lawyers: What a PDF Hides From It

By Published 10 min readUpdated

AI PDF chat for lawyers means asking questions of a PDF and getting answers drawn from its text. The catch is that a PDF is a picture of pages first and a container of text second. Scans, page labels, tables, footnotes and false redactions can all change what the tool reads and how it cites.

Why can an AI tool read one PDF and not another?

A tool that reads the text stored inside a PDF has nothing to read when the PDF stores none. A PDF made by saving a Word document holds its words as text. A PDF made by a scanner holds a photograph of each page, and the words in it are only shapes.

Adobe's own help page on recognizing text in scanned PDFs puts it this way: "When you scan a paper document to PDF, the resulting file contains only image data, not searchable text." Optical character recognition, or OCR, is the step that converts the image of the words into text a program can select and search.

From paper to text a tool can read
  1. 01

    Scan

    The file holds only image data

  2. 02

    Recognition

    OCR converts the image of the words into text

  3. 03

    Text layer

    The recognizer's reading, with any errors it made

  4. 04

    Tool

    Reads the text, not the look of the page

There is a quick test that needs no special software. Open the PDF, and try to select a sentence with the cursor or search for a word that is plainly on the page. If nothing can be selected and the search finds nothing, the page is an image.

Three kinds of file turn up in a matter:

Kind of PDFHow it was madeWhat a tool can read
Text PDFSaved or printed to PDF from a programThe text as written
Scan without OCRPaper through a scannerNothing, unless the tool runs recognition itself
Scan with OCRA scan with recognition run afterwardsThe recognizer's reading of the page, with any errors it made

The third kind deserves a second look. Recognition can misread a faint fax, a stamp across a line, or handwriting, and a mistake then sits in the text layer where no one sees it. The page can look right while the text behind it says something slightly different, and the text is what the tool reads.

A single file can also mix the kinds. A production may be text for its first 200 pages and scanned exhibits after that.

Lucerna Law's documentation is direct on this point: a scanned page in a PDF of up to 1,000 pages is read from its image, with no text in the file to check that reading against, and the file's page says which pages were read that way. A scan in a longer PDF yields no passages. Run recognition before uploading a long scan, or split it into files of 1,000 pages or fewer.

PDF page numbers and the numbers printed on the page

A PDF has two sets of page numbers: the position of each page in the file, and whatever number is printed on the page. They agree only when the document starts at page 1 and nothing was added in front. A citation is only useful once you know which set it uses.

Adobe's help page on renumbering pages says "the page numbers shown in thumbnails and the navigation toolbar may not match the printed numbers on the document," and gives the reason: numbers are assigned in sequence from 1, "but PDFs often include front matter, like a cover page or table of contents."

Legal documents add their own variations:

  • Deposition transcripts. A caption page, an appearance page and an index may come before testimony page 1. A condensed transcript may print several transcript pages on each sheet.
  • Bates-stamped productions. Each page carries a Bates number, which need not match its position in the file.
  • Combined exhibits. A PDF that joins a declaration and six exhibits has one count running through all of them, while each exhibit may restart at 1.
  • Briefs. Tables of contents and authorities may be numbered in roman numerals.

Lucerna Law cites a PDF by page and paragraph, and the page is the PDF's own: the position in the file. A citation to "p. 14" means the fourteenth page of the file, which may be printed page 11 of a transcript.

Record the offset once per file, in the file's description, so nobody has to rediscover it.

How do tables, columns, footnotes and headers come out of a PDF?

Tables, columns, footnotes and headers can come out of a PDF as runs of text with positions on the page. The file may hold no mark that says "this is a cell" or "this paragraph ends here". A program that reads it then has to infer structure.

Lucerna Law's reader states its own inference on the file's page in the application. A PDF does not mark where paragraphs end, so a new paragraph is assumed where the space between two lines is clearly larger than usual for the page, or where the text jumps back up the page as it does at the top of a second column. Paragraphs set apart only by an indent are read together.

That has practical consequences for a lawyer's questions.

FeatureWhat can go wrongWhat to do
TablesThe grid is lost. A figure may be read next to the wrong label, or a row may run togetherOpen the page and read the table yourself before using any number
Two columnsText from one column can be joined to the other if the break is missedCheck quotations that cross a column
FootnotesA footnote is text on the page like any other, and may be read as part of the body or as a paragraph of its ownAsk about footnotes by name when they matter
Running headers and footersA caption or confidentiality legend repeated on every page may be read as text on every pageDo not mistake it for content if it shows up in a quoted passage
Line numbersPleading paper and transcripts print a number beside each lineStray numbers inside quoted text may be these

Word files behave differently. Lucerna Law's documentation says that in a Word document footnotes, headers and comments are not read. Where both a Word original and a PDF copy exist, the choice between them decides whether the footnotes are in the matter at all.

Numbers deserve the most care. A damages schedule, a payment history or a table of test results is exactly where a wrong pairing does harm, and a cited answer can still be wrong about which figure belongs to which row.

Ask the file

What does the payment schedule on page 12 list for March, and what is the exact text of that row?

Asking for the exact text of the row makes the check quick: the quoted run either matches the page or it does not. How to word questions more generally is covered in the guide to AI for legal documents.

Redactions in a PDF that are only black boxes

A redaction that is only a black box is a drawing placed over text that is still in the file. Anyone, or any program, that reads the PDF's text reads the words under the box. This matters in both directions: for what a firm sends, and for what it receives.

Courts have warned filers about it in plain terms. The Northern District of California's guidance on redaction of information in e-filed documents says that edits made by graphic and commenting tools "which can black-out, cover over or remove sections of text can still be removed by anyone to reveal the text underneath." The same page warns that a scan of a page covered with marker or tape "may still provide enough image detail to enable someone to see what was assumed hidden." The Northern District of Alabama publishes the same warnings on its page of proper redaction techniques.

When the firm is sending

For filings in federal court, Federal Rule of Civil Procedure 5.2(a) limits what a filing may include of a social-security number, a taxpayer-identification number, a birth date, the name of an individual known to be a minor, and a financial-account number, "unless the court orders otherwise." A box that leaves the full number in the text layer leaves the full number in the filing.

The test is the same as for a scan, reversed. Search the finished PDF for the redacted words, and try to select the text under the box. If either works, the redaction failed.

When the firm is receiving

A tool that reads the text layer can read whatever is under an ineffective box in a document the other side produced, and may quote it in an answer. Before uploading a production with visible redactions, test a few of them. What a lawyer must do on finding that an opponent's redactions failed is a question of professional responsibility and of the rules of the court, and it is outside this post.

Portfolios, bookmarks and attachments inside a PDF

Some PDFs are containers for other files. A PDF Portfolio holds separate documents, a PDF can carry attachments, and bookmarks give a long file a table of contents that is not part of the page text. A tool that reads pages may see none of these.

Adobe's overview of PDF Portfolios says the files in a portfolio "can be in a wide range of file types created in different applications," including "text documents, e-mail messages, spreadsheets, CAD drawings, and PowerPoint presentations," and that "the original files retain their individual identities but are assembled into one PDF Portfolio file."

Bookmarks are navigation, described on Adobe's page about page thumbnails and bookmarks as "a link with representative text in the Bookmarks panel." In a combined exhibit file, the bookmarks may be the only place that says where Exhibit D begins.

Lucerna Law's pages describe reading a PDF's pages into passages. They describe no reading of a portfolio's component files, of files attached to a PDF, or of bookmarks. Its accepted types are PDF, Word (.docx), email (.eml), and text, CSV or XML exports, so an Excel workbook or a slide deck inside a portfolio is not among the file types it accepts.

The safe course is to take the container apart first. Extract each component as its own file, name it for what it is, and upload the ones in accepted formats. For email, the format matters too: the post on email evidence explains which email file formats Lucerna Law accepts and what each keeps.

What are the size and page limits for a PDF in Lucerna Law?

Lucerna Law accepts a PDF of up to 25 MB and up to 2,000 pages. Those limits are in its documentation along with three others that bear on a large file. A file over a limit is refused; it is not read in part.

LimitValue
Size of one uploaded file25 MB
Pages in one PDF2,000 on a paid plan; one on Free, where a new firm starts
Passages one file can become30,000
Time allowed to read one PDFReading stops with a refusal after 20 seconds
Storage for one firmSet by its plan: 1 GB on Free, where a new firm starts, and 50 GB on Solo

A second kind of limit applies when questions are asked. The security section of the homepage says a matter of up to about 150 single-spaced pages goes to the model whole, and from a larger one only the passages that best match the question are sent. A long PDF therefore changes how to ask: narrow questions, and no assumption that "list every mention" is complete.

Splitting a PDF that is too large is straightforward, with one trap. Each part starts again at page 1, so a citation to "p. 40" of part 3 is not page 40 of the original. Put the original page range in each part's title, such as "Production vol. 2, pp. 2001-4000".

Preparing a PDF before upload: a checklist

Preparing a PDF means settling, before anyone asks it a question, whether it has text, how its pages are numbered, and whether it hides or contains anything. The steps below apply to any tool that reads PDFs.

  • Search the file for a word visible on the first, middle and last pages. If the search fails anywhere, run text recognition.
  • Read one recognized page against its image, and pick a hard one.
  • Note the difference between the file's page count and the printed page numbers.
  • Try to select text under any redaction box.
  • Check for a portfolio, attachments and bookmarks, and extract what matters.
  • Split a combined file at document boundaries, with the page range in each title.
  • Confirm each part is under the size and page limits of the tool.
  • Give each file a title a citation can use: "Reyes Dep." reads better in an answer than "scan0042".

The page-number note pays off late in a case. Designations, exhibit references and a trial binder all cite by page, and the guide to AI trial preparation shows where a three-page offset would surface at the worst moment.