Knowledge Base and examples

Knowledge Base - Support annotation click on Android

To support the annotation click, you need to implement a listener to handle the different types of annotations (annotations could be link, hyperlink, text, movie, sound, generic binary, etc.).

If you are using the PDFReader view class, you need to implement the listener PDFReaderListener:

public interface PDFReaderListener {

            public void OnPageModified(int pageno);

            public void OnPageChanged(int pageno);

            public void OnAnnotClicked(PDFVPage vpage, Annotation annot);

            public void OnSelectEnd(String text);

            public void OnOpenURI(String uri);

            public void OnOpenJS(String js);

            public void OnOpenMovie(String path);

            public void OnOpenSound(int[] paras, String path);

            public void OnOpenAttachment(String path);

            public void OnOpen3D(String path);

}

In OnAnnotClicked, you need to call m_reader.PDFPerformAnnot(); which is responsible for identifying the different types of annotations, handling the goto-annotations and extracting the data for the other types (hyperlinks, JavaScript, video, audio, attachment and 3D) and passing them to the corresponding methods for you to handle.

If you are using PDFLayoutView (available from version 3.4 and above), you need to implement the listener PDFLayoutListener:

                  public interface PDFLayoutListener {

            public void OnPDFPageModified(int pageno);

            public void OnPDFPageChanged(int pageno);

            public void OnPDFAnnotTapped(VPage vpage, Annotation annot);

            public void OnPDFBlankTapped();

            public void OnPDFSelectEnd(String text);

            public void OnPDFOpenURI(String uri);

            public void OnPDFOpenJS(String js);

            public void OnPDFOpenMovie(String path);

            public void OnPDFOpenSound(int[] paras, String path);

            public void OnPDFOpenAttachment(String path);

            public void OnPDFOpen3D(String path);

      }

Applies To

RadaeePDF SDK for Android

Related Articles

Support annotation click on iOS

Details

Created : 2015-01-16 18:14:22, Last Modified : 2015-02-03 10:46:56