write_first_page_first.json
The JSON file of the “Showing page one before the file has arrived” example. The same document written twice, the ordinary way and with its first page moved to the head of the file, with how much of each must arrive before page one appears.
This file is far longer than the others: showing it whole would make this page ten times heavier than any other, which is paid for by whoever reads it on a telephone. So the page shows how the file opens, and the button below hands over the file itself, entire.
This file is a request: an application sends it over the network to the server, which creates the PDF and sends it back. It makes the same page as the Rust and Python versions of this example. A request names every file it uses, never its content; the call carries the request and the files together. A font the server already holds, such as DejaVuSans, is named with nothing attached. Send the request to the address the API page gives.
What this example is for
Open the book below: the first page appears the instant you click it, as though the file carried a single page — and it carries 357. That is the whole of what this example is for, and it is worth more the longer the document gets: a catalogue, a manual, a report of two hundred pages behaves the same way.
What this example shows
- A long book whose first page is there the instant you click it.
- The rest arriving quietly behind it, while you read.
- Jumping to a page in the middle fetching that page, not the book.