joniks / Android-MuPDF

MuPDF usage for magazine reading
GNU Affero General Public License v3.0
184 stars 74 forks source link

Alternatives for deprecated methods for MuPDF #14

Open Priyanka-Razdan opened 8 years ago

Priyanka-Razdan commented 8 years ago

In our Android application we were using previous version of MuPDF library, and it was used for showing PDF with embedded links as well as custom widgets such as image gallery, youtube video, scrolling text etc. using getPageLink() where this method was used for reading the links.

But now we have used your project as the base to integrate the MuPDF in application for upgrading the application with latest MuPDF library.But there are such methods which are deprecated and not found in current MuPDFCore.java. Since they are native methods we cannot write any custom method which would serve the same purpose.

There are many more methods which found previously but now they are deprecated one of them is the getPageLink().

So are there any alternative to use these methods or are there any such methods which might serve the same purpose.

Please let us know any solution ASAP.

joniks commented 8 years ago

https://github.com/joniks/Android-MuPDF/blob/master/library/src/com/artifex/mupdflib/MuPDFCore.java on line 495 contain function: public synchronized LinkInfo[] getPageLinks(int page) {

Priyanka-Razdan commented 8 years ago

The getPageLinks() serves different purpose then getPageLink(). The getPageLinks() returns the all hyper links (i.e http links, mailto links) but we want the embedded links(links which are externally embedded in PDF). Could you please let me know any alternative to method by which we can get embedded link in PDF.

lowfiend commented 8 years ago

I have a question with getPageLinks().

" getPageLinks() returns the all hyper links " contain you want the embedded links?

Priyanka-Razdan commented 8 years ago

Yes we want the embedded links

joniks commented 8 years ago

Can you share pdf file sample with embedded link for testing?

Priyanka-Razdan commented 8 years ago

Sample_Test_8751.pdf

On cover page: There is AdobeEdge Third page: There are embedded links

joniks commented 8 years ago

You need specific embedded link url (html://imagegallery-1350/ or html://scrollingtext-1351/) scheme parser and pdf overlay functionality. Here i found libreliodev team sample project with required functionality: https://github.com/libreliodev/android/tree/master/main/src/main/java/com/artifex/mupdfdemo

sssvrock commented 8 years ago

Hi Joniks,

Thanks for providing mupdf library for rendering pdf page. I am trying to render with pdf file page size of having 4 mb but

I/libmupdf: Rendering page(0)=720x1122 patch=[0,0,720,1122] error: malloc of array (3863 x 15452 bytes) failed warning: Ignoring errors during rendering error: malloc of array (4258 x 17032 bytes) failed error: malloc of array (2594 x 10376 bytes) failed error: malloc of array (737 x 2948 bytes) failed error: malloc of array (711 x 2844 bytes) failed error: malloc of array (4298 x 17192 bytes) failed error: malloc of array (1496 x 5984 bytes) failed error: malloc of array (1609 x 6436 bytes) failed error: malloc of array (1665 x 6660 bytes) failed error: malloc of array (470 x 1880 bytes) failed error: malloc of array (759 x 3036 bytes) failed error: malloc of array (1922 x 7688 bytes) failed error: malloc of array (1983 x 7932 bytes) failed error: malloc of array (491 x 1964 bytes) failed malloc of array (1871 x 7484 bytes) failed malloc of array (2776 x 11104 bytes) failed error: malloc of array (2990 x 11960 bytes) failed E/libmupdf: error: resize array (1024 x 4 bytes) failed

Some good solution to make it works is appreciated.

Regards Vinod