Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

How to hide a button of mutilmedia in pdf file? 5 years 11 months ago #13792

  • 军罗
  • 军罗's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 0
I had insert a vedio to pdf file first,and set status to invisible,then i used radaee SDK to open it ,but it visible。I found a method to hide it, www.radaeepdf.com/forum/search?query=set...7/2018&childforums=1,
my code is in follow:

public void HideAnnotatioin() {
int pageCount = m_doc.GetPageCount();
for (int i = 0; i < pageCount; i++) {
Page page = m_doc.GetPage(i);
page.ObjsStart();
int anncount = page.GetAnnotCount();
for (int j = 0; j < anncount; j++) {
Annotation annotation = page.GetAnnot(i);
if (annotation != null) {
annotation.SetHide(true);
}
}
m_layout.vRenderSync(m_layout.vGetPage(i));
page.Close();
}
}
but it doesn't work, it make me confused。

Please Log in or Create an account to join the conversation.

How to hide a button of mutilmedia in pdf file? 5 years 11 months ago #13795

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
first of all you have to change your code like this :
public void HideAnnotatioin() {
        int pageCount = m_doc.GetPageCount();
        for (int i = 0; i < pageCount; i++) {
            Page page = m_doc.GetPage(i);
            page.ObjsStart();
            int annCount = page.GetAnnotCount();
            for (int j = 0; j < annCount; j++) {
                Annotation annotation = page.GetAnnot(j);
                if (annotation != null) {
                    annotation.SetHide(true);
                }
            }
            //m_layout.vRenderSync(m_layout.vGetPage(i));
            page.Close();
        }
    }

I suggest you to place this code just after the pdf opening, as example in the demo project you can put it in the onPostExecute() of OpenTask in PDFViewAct.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum