Git Product home page Git Product logo

androidpdfviewerv1's People

Contributors

barteksc avatar miha-x64 avatar monahammad avatar yusefmaali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

androidpdfviewerv1's Issues

Crash when dismissing while zooming animation plays

We ran into an issue posted on Rollbar and figured out it's happening when the PDFView zoom animation is, playing due to a double tap, and the user dismisses the PDFView. Our parent view, which is a Dialog-based class, contains a button to close the PDFView and Dialog. The user can also click the Back button to do the same action.

We fixed this by overriding our onBackPressed() in the parent Dialog as well as that dismiss button and checking if the view PDFView.isZooming() If it is, we PDFView.resetZoomWithAnimation() instead of dismissing.

I'm posting it here just in case maintainers would like to enhance the PDFView to avoid the crash. If you don't see this as an issue, feel free to close, or let me know if you'd like me to close it.

Thanks,
Anthony

Versions of library in use

implementation 'com.github.barteksc:android-pdf-viewer:1.6.0'
implementation 'com.github.barteksc:pdfium-android:1.9.0'

Stacktrace

java.lang.NullPointerException: Attempt to read from field 'long com.shockwave.pdfium.PdfDocument.mNativeDocPtr' on a null object reference
1 at com.shockwave.pdfium.PdfiumCore.openPage (PdfiumCore.java:166)
2 at com.github.barteksc.pdfviewer.PDFView.loadPage (PDFView.java:706)
3 at com.github.barteksc.pdfviewer.PDFView.loadPages (PDFView.java:664)
4 at com.github.barteksc.pdfviewer.AnimationManager$ZoomAnimation.onAnimationEnd (AnimationManager.java:153)

Page number not showing

I have implemented this pdfviewer. It is working fine but when I scroll the scrollbar, it is not showing page number. I have tried everything on the internet but issue is still not solved. Please help.

ANR issue

I am attempting to open a file with a size of 76MB, and upon using this library, my application displays an ANR (Application Not Responding) dialog.

Watermark

is there no option to show watermark ?

Ability to create PDFView programatically

How do I use this without using a layout.xml?

for example, with Android's own TextView, we can do the following -

TextView textView = new TextView(context);

(Because, there, the AttributeSet object is optional.)

But cannot seem to do the same with PDFView, because it's constructor requires an AttributeSet set object as it's the second argument, and I have no idea where to get that from...

public PDFView(Context context, AttributeSet set) {

Why though?

I need to use it this way, in order to create a Flutter AndroidView, which will enable this library to be used from flutter as a widget!

More context

Using in RecyclerView gives blank page

Hi, I am trying to use PDFViewer inside a RecyclerView as my requirement is to render multiple PDF files consisting single page each. The pages are rendered perfectly for the first time, but when I scroll to bottom of RecyclerView and again scroll back to previous pages then I am getting blank views. Can anyone suggest me a way to overcome this and let me know if I am trying to do it in an wrong way. Any help is appreciated, thanks.

Please fix those bugs and update asap.

Crash 1:

java.lang.NullPointerException: 
  at com.github.barteksc.pdfviewer.PDFView.loadPages (PDFView.java:651)
  at com.github.barteksc.pdfviewer.PDFView.onSizeChanged (PDFView.java:481)

Crash 2:

java.lang.NullPointerException: 
  at com.shockwave.pdfium.PdfiumCore.openPage (PdfiumCore.java:134)
  at com.github.barteksc.pdfviewer.PDFView.loadPage (PDFView.java:706)
  at com.github.barteksc.pdfviewer.PDFView.loadPages (PDFView.java:664)
  at com.github.barteksc.pdfviewer.AnimationManager$FlingAnimation.onAnimationEnd (AnimationManager.java:182)

Page change issue

pdfView.onPageChange() method is called every time when I shake/move page...

it's a very big issue for me

When page will fully change then this method should to call otherwise not...

Different size of page

I have the pdf like this

          ---------
          |       |
          |       |  -----------
          |       |  |          |
-------   |       |  |          |
|      |  |       |  |          |
|      |  |       |  |          |
-------   |       |  |          |
          |       |  |          |
          |       |  -----------
          |       |
          |       |
          ---------

And so on, but i want to display it like according to width of my phon.

-------  --------  --------
|       ||       ||       |
|       ||       ||       |
------- ||       ||       |
        ||       ||       |
        ||       |--------
        ||       |
          --------

Is there any solutions?

Not rendering in Recyclerview

Hi @barteksc ,

In general PDF contains more papers, in my case I am rendering single page with <com.github.barteksc.pdfviewer.PDFView>

I am displaying Each PDF file in Recyclerview using Adapter, so I can do load more for each pdf file it makes user comfort of rendering of pdf files.

While I m scrolling down the property of recyclerview is reusing the the views so at that time Pdfium core is distroyed and it is not at all rendering in scrolldown.

Here is logcat:

D/Error: 480.0
02-09 15:42:12.534 20576-20576/com.self.pdf_poc D/Error: 480.0
02-09 15:42:12.582 20576-20576/com.self.pdf_poc D/Error: 480.0
02-09 15:42:12.614 20576-20576/com.self.pdf_poc D/Error: 480.0
02-09 15:42:15.054 20576-20576/com.self.pdf_poc D/jniPdfium: Destroy FPDF library
02-09 15:42:20.513 20576-20576/com.self.pdf_poc D/AndroidRuntime: Shutting down VM
02-09 15:42:20.529 20576-20576/com.self.pdf_poc E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.self.pdf_poc, PID: 20576
java.lang.NullPointerException: Attempt to read from field 'long com.shockwave.pdfium.PdfDocument.mNativeDocPtr' on a null object reference
at com.shockwave.pdfium.PdfiumCore.openPage(PdfiumCore.java:134)
at com.github.barteksc.pdfviewer.PDFView.loadPage(PDFView.java:706)
at com.github.barteksc.pdfviewer.PDFView.loadPages(PDFView.java:664)

How can I achieve my solution. Please let me know it's urgent

Thanks

Slow paging

Sometimes I have to drag the page from right to left through all the screen width slowly to get the next page and if I stopped in between or started from the center of the screen it doesn't switch pages, is there any improvements for that?

Search Support

Can we search keywords on pdf files. Do you support search.

F.jjjjf@

<com.github.barteksc.pdfviewer.ScrollBar
	android:id="@+id/scrollBar"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	app:sb_horizontal="true"
	android:layout_alignParentBottom="true" />

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.