I want to write a simple function that "turns the pages" in pdf-view-mode. If I'm reading a file with one book page per pdf page that's simple: pdf-view-next-page plus image-scroll-down (to get me to the top of the page, assuming it's cropped).
But if each pdf page is a scan of two book pages side by side, the function should check if the image is cropped and I'm looking at the bottom left region (the lower part of the left page), and in that case move me to the top right part of the image. If instead I'm looking at the bottom right, it will move me to the top left of the next image.
In order to do that I need to know:
- how to refer to the image that is currently being displayed in pdf-view-mode
- how to check its size to see if it's wider than it is tall (image-size should be the function, but I don't know on what to call it)
- how to get the position of the current crop region