Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7041 Reply

    deko

    Simple question: How do I use the goToPage() in my code:

    No errors are being shown but when trying to open the document v.goToPage is throwing a null exception:
    Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.epapyrus.plugpdf.core.viewer.BasePlugPDFDisplay.goToPage(int)' on a null object reference
    What is the problem here?

    #7046 Reply

    Dr. Plug
    Moderator

    Hi deko,

    Thank you for your inquiry. The reason is that still did not open the PDF file. Because ‘openUrl’ is Download the file first. After download, when opening PDF, you can get open event via ‘onLoadFinish’ in the ‘ReaderListener’ class. So, please move ‘goToPage’ code into ‘onLoadFinish’.

    hope it resolves your problem.
    Thank you,
    Dr. Plug

    #7052 Reply

    deko

    Thank you, found the method, with goTopage already there 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: How to use goToPage?
Your information: