Open a PDF without downloading the whole file
Your browser already opens PDFs, and it is good at it. What it does not do is open part of one. It fetches every byte of a 300 MB scanned book before it draws page one, and it cannot read the text off a scanned page at all. Foretaste can do both.
01
The honest starting point
If you searched for a way to view a PDF in your browser, you already have one. Chrome, Edge and Firefox all ship a PDF viewer, it is written in C++, it is faster than anything JavaScript will do, and it gives you search, printing, text selection and screen-reader support for free. There is no version of this page where installing an extension makes an ordinary PDF open better.
So this page is about the three cases where the built-in viewer runs out, because those are the cases worth an extension.
02
A browser fetches the whole file first
This is the interesting one, and it is the reason a PDF was for a long time the one format this product did not apply to itself. Everything else Foretaste opens reads a part and reports how much: a 40 MB ZIP is listed from 67 KB, and the meter under the file says so. A PDF downloaded all of it and the meter always read "the whole file was read".
A PDF keeps its cross-reference table at the end of the file, with every object addressed by byte offset. That is the same property that makes a ZIP listable from its tail, and it means a reader that knows how can fetch the tail, read the table, and then ask the server for exactly the ranges the pages on screen need.
Foretaste has a second PDF engine that does this. It hands the renderer the address rather than the bytes and lets it range-read. The number under the file is measured by the renderer and reported, never estimated from the page count, because only the code that did the reading knows what it actually asked for.
The catch: it needs a server that serves byte ranges. Most do. One that does not falls back to the whole file, and the meter says so rather than pretending.
03
Two engines, and the browser's is still the default
There is a real trade here rather than a better option, so Foretaste ships both and lets you switch a single file with a toolbar button without changing the setting. The browser's own viewer is the default and should stay it.
| The browser's viewer | Foretaste's own | |
|---|---|---|
| Speed and memory | Better. C++, tuned for exactly this | Worse. Every page rasterised to a canvas in JavaScript |
| Search, print, select, accessibility | Yes, for free | No |
| What it fetches | The whole file, before page one | The index, then the ranges a page needs |
| In the in-page panel on Firefox | Nothing at all, see below | Works |
The setting is Settings, then Files, then How PDFs are drawn, and the screen shows this comparison rather than a recommendation, because which one is right depends entirely on the file in front of you.
04
The Firefox panel, which is the second reason
Firefox will not load an extension's own blob into a frame inside somebody else's page. In the panel that opens over a page there, the native viewer draws a blank rectangle, and no amount of trying harder changes that.
Foretaste notices and switches to its own engine, with a line saying why. It notices by reading the document's content type rather than by testing whether the frame looks empty: a working Chrome PDF viewer presents an empty body to its parent, so an emptiness test would condemn the one that was fine.
05
Reading the text out, including off a scan
The third case. "Read the text" pulls the words out of a PDF, and the first useful thing about it is that most PDFs are not scans. A document written by a word processor carries its text as text, and reading it is exact, instant and needs no rendering at all.
So Foretaste decides page by page:
- A page with a text layer is read straight out. Nothing is drawn and nothing is guessed. What you get is what the file says.
- A page without one is a photograph of paper. It is rendered and handed to an OCR engine compiled to WebAssembly, running in a worker inside your browser — the same one that reads the text out of an ordinary picture.
You are told which pages were which, because a text layer is exact and recognition is a guess, and a reader deciding whether to trust a sentence deserves to know which of the two it came from. A scanner often leaves a stray page number or watermark on an otherwise blank scan, so a page needs more than twenty characters before it counts as having text at all.
English needs no network request. The language data ships inside the extension package. Other languages are a pack you fetch from a button, once, cached after that.
The results can be saved as plain text or as JSON, and searched by page.
06
Everything expensive is behind a press
Reading the text and drawing every page as a contact sheet both need the whole file, so under the range-reading engine they sit behind one button that says what it will cost before it spends it. That is the same rule the checksum button and the scanned-page fetch follow, and it is the point of the meter: you should know what a press costs before you make it.
Looking at a PDF still costs nothing. The PDF renderer is a separate chunk that arrives when a PDF does, and a PDF with a text layer never loads the OCR engine at all.
What you actually see, and where it stops
The document, in your browser’s own PDF viewer, plus two things it cannot do: read the text out, and draw every page as a contact sheet so you can find the one you want.
Whatever your browser does. You cannot fill in a form or annotate a page here. Reading the text covers the first 20 pages a press: pages that carry text are read exactly, pages that are scans are recognised, and you are told which were which. A scanned page compressed as JPEG 2000 or JBIG2 draws too; those decoders are carried in the package rather than fetched.
Two things are deliberately not here. There is no page count on the summary card, and there is no search across a PDF, because both would mean loading a renderer for a file you have only glanced at. A renderer being present in the package is not on its own an argument for using it.
And the file goes nowhere. The bytes travel from the website they already live on to your browser and are read there. What Foretaste can and cannot see is the whole accounting, including the reason a confidential PDF is a reasonable thing to open this way and an online converter is not. To preview other document formats without downloading, read how to open Word, Excel and PowerPoint documents or our general guide on how to view files without downloading them.
The questions people ask
Does a browser download a PDF before showing it?
The built-in viewer in Chrome, Edge and Firefox fetches the entire file before it draws the first page. On a 300 MB scanned book that is 300 MB before you can tell whether it is the right book. Foretaste has a second engine that hands the address to the renderer instead of the bytes, so it reads the cross-reference table at the end of the file and then only the byte ranges the pages on screen need.
Can you read the text out of a scanned PDF without uploading it?
Yes. Foretaste decides page by page: a page with a text layer is read out exactly, without rendering anything, and a page without one is a scan, so it is drawn and recognised by an OCR engine compiled to WebAssembly that runs inside the browser. English ships in the extension package, so recognising English text makes no network request at all.
Why does a PDF show as a blank rectangle in the in-page panel on Firefox?
Firefox will not load an extension blob into a frame inside somebody else’s page, so the native viewer draws nothing there. Foretaste notices this by checking the document content type rather than by testing for emptiness, and switches to its own engine with a line saying why.
Why does a PDF link download instead of opening in the browser?
A PDF link downloads instead of displaying when the server sends a Content-Disposition: attachment header, or a Content-Type that the browser has no viewer for. The browser's built-in PDF viewer only works when the browser is the one navigating to the URL; a forced download bypasses that. Foretaste reads the file without navigating to it, so the attachment instruction has nothing to act on.
Can I read a large PDF without downloading the whole file?
Foretaste hands the PDF address to its rendering engine rather than the bytes, so the engine reads the cross-reference table at the end of the file and then fetches only the byte ranges the visible pages need. On a 300 MB scanned book, you read only as much as you look at.