How to implement Page Curl in MuPDF
Asked Answered
S

1

10

I have two libraries one is MuPDF to view PDF files in android and second is pageCurl to implement the page curl effect, but it works for bitmaps. Now, I have no idea how can i integrate both of these to get page curl effect in PDF files, opened by MuPDF. If any one has already implemented this or knows about some link then please help me.

Thanks

Sitzmark answered 21/1, 2013 at 11:7 Comment(6)
It would be helpful if you could include links to the MuPDF and pageCurl libraries that you are referring to.Aplanatic
@Aplanatic Thanks for your attention here is the line for MuPDF mupdf.com and for the PageCurl github.com/harism/android_page_curlSitzmark
@Ali Imran did you resolved this?Lenny
No, i have not found this solution yet :(.Sitzmark
#937813 This post will help youLoree
@SureshSharma your link is totaly unrelated to my question :) by the way thanks for your attention.Sitzmark
O
3

As far as I know there's no simple way to accomplish this. I made a real world app for a wide spread national newspaper: the only way seems to work with bitmaps. They used server side pdf for iOS devices and jpg bitmaps for the Android counterpart.

Keep in mind that working with large bitmaps is a pain in android. That's the reason why pdf viewers renders them in chunk: if you scroll too much, in zooming mode, the high resolution chunks already loaded in memory keep being garbage collected and lost. Test it with whatever pdf implementation (even muPDF) you choose.

2 bitmaps at once (front page and back page, for example) with resolutions of say about 1200x800 eat up the whole app heap memory causing the infamous unrecoverable OutOfMemory exception. Every device has a fixed (and different) amount of heap memory to use for the objects in memory and suffer max allocation limitations too.

My suggestion is:
save your time and change implementation to prerendered images from pdf (server side the best if possible, or prerender directly on device) and manage low memory limited device with different resolution ones.

I'm an Android enthusiast developer but I'm waiting ages for some all-pdf components that could accomplish what iOS devices already do flawlessly. Good luck.

Orthographize answered 23/2, 2013 at 14:44 Comment(1)
I have searched for whole day for "page curl in pdf".every one suggested about muPDF renderer.And implement muPDF itself is very tricky in android.even 1 in 100 projects used muPdf in their project.Searching till now I think muPDF along pagecurl is not possible in androidNewton

© 2022 - 2024 — McMap. All rights reserved.