I’m working on a project revolving around the digitalized text of an old English book, but the owner of the website wants to provide the option to link to each corresponding page of the original text–which happens to be archived in PDF form.
That said, every time someone clicks on a link to a specific page, it does go to that page, but it also downloads the ENTIRE book before going to the page. This is unacceptable as far as I’m concerned.
To that end, is it possible to somehow specify or throttle the incoming HTTP request made by the user to tell the PHP to server ONLY the specified page for download?
I think that’s the conclusion we came to as well–more or less.
We’re wanting to basically serve original copies, but on a per-page basis and since we have individual TIFFs of the converted PDF, we’ve decided to simply serve up images corresponding to each page a user might be viewing… Simple enough.
Firstly, you wouldn’t be able to only serve 1 page out of a multipage PDF because it is a binary format.
After I read your question I was thinking about whether or not PHP could read a PDF and extract a single page from it. However, this might be quite performance heavy on the server for each request to see an individual page of the PDF.
It might be simpler and more straightforward to simply extract all pages of the book in to separate PDFs that can be individually accessed. (Adobe Acrobat Professional can do this quite easily.)