The variable i created because I intended to make continuous scroll a configurable option,
but in the end it was much easier to first implement it not as an option.
As I write below, I got continuous-scroll working very fine in pdf-tools. But a drawback of the
design with the overlay and the placeholders, is that now it is not (easily) possible to split
the buffer and scroll it in two different windows, because the drawing/deleting of the images
effects the (overlays in the) other buffer also.
Anyway, as I mentioned already I was focusing on pdf-tools now, because it seemed much
less work to me to implement continuous scroll there, while it provides also a more powerful
pdf-reader/editor. I have successfully implemented continuous scroll and got most basic
functionality like outline, links, annotations etc. working. So using it works nice for the most part,
except when resizing the window, for some reason, the redisplay does not work correctly there.
The overlay seems to be in the correct position. From checking the `overlay-properties` it seems
to also hold the image correctly, but even though the buffer has been scrolled to the right position,
the overlay does not show the image (it shows an empty image, but when I save the image from
the overlay and open it in image-mode, I do correctly see the image of a page).
Maybe at some point, although pdf-tools is not yet part of core emacs, some expert here might
like to have a look at it. The code can be found
here.