2

I'm using the mupdf library (http://mupdf.com/doc/how-to-build-mupdf-for-android) on my android application. It is working fine, i can see the pdf pages perfectly. But when I'm on landscape mode just one page is shown.

I wanna know how to show two pages per time while on landscape mode. Is there an easy way to do that? Or complex code change must be done?

I'm using the following mupdf commit version: commit e16103ffd0db53a6d4aece9926279271d6b5a6a4 Date: Fri Jun 28 16:29:33 2013 +0200

Derzu
  • 7,011
  • 3
  • 57
  • 60
  • @robin-watts Are you planning to add this functionality to the mupdf? – Derzu Jul 15 '13 at 20:29
  • http://mupdf.com/doc/how-to-build-mupdf-for-android link is broken. Do you have another source of tutorial? It would be a great help. Thanks – Saikat1529 Oct 03 '18 at 11:04

1 Answers1

4

We have a similar feature in our Android customizable magazine app, using muPDF: in portrait mode one page is shown, but in landscape mode, a double page is shown. This app is open source and available on Github. It should be easy for you to review the code, and see how we implemented this feature.

Librelio
  • 491
  • 3
  • 9
  • Thanks Librelio, I found the code that adds the functionality of two pages together on landscape mode (classes MuPDFActivity and MuPDFCore). I also made an upgrade on your code to show the first page and last centered. If you wanna I can send you the file with this upgrade or commit on git, if you give-me write permission. – Derzu Jul 14 '13 at 20:09
  • Thank you for your contribution, Derzu. – Librelio Jul 17 '13 at 16:43
  • Did you update to MuPDF source code or not? Or should I download the Librelio's source code? – Bagusflyer Mar 05 '14 at 10:28
  • bagusflyer, you should download the librelio's source code – Librelio Mar 05 '14 at 14:13
  • 1
    Thanks. I've downloaded. But it still shows one page when I rotate the device. (Although I found there are functions like showDisplay(1) or showDisplay(2), etc). By the way, is the iOS version the same? Why it's not open source anymore? – Bagusflyer Mar 06 '14 at 11:06
  • Feel free to post an issue on Github regarding this, but it should show 2 pages. We have many apps with this feature. The iOS version is basically the same. It is no longer open source for internal reasons. However, you have the right to continue to use the latest version provided under the MIT license. – Librelio Mar 06 '14 at 15:58
  • @Librelio i am implementing a code of yours for showing two pages in landscape but i am not able to get it done. Please help. I have into this from past two days. – Anchit Mittal Apr 18 '14 at 09:52
  • @AnchitMittal Can you give more details of what your problem is? – Intrications Apr 21 '14 at 06:05