PDF automatically zoom when I click button or link - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: PDF automatically zoom when I click button or link

PDF automatically zoom when I click button or link 1 year 4 months ago #12549

  • rachnasagar
  • rachnasagar's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 69
  • Thank you received: 0
When I am opening URI or Video the PDF automatically zoom . I am using this

For URI --
@Override
public void OnPDFOpenURI(String uri)
{
try
{
Intent intent = new Intent(Intent.ACTION_VIEW);
intent .setClass(this, ShowWebView.class);
intent .putExtra("Linkpass", uri);
startActivity(intent );
}
catch(Exception e)
{
//Toast.makeText(PDFViewAct.this, "todo: open url:" + uri, Toast.LENGTH_SHORT).show();
}
}


And this for Videos

public void OnPDFOpenMovie(String path)
{
//Toast.makeText(PDFViewAct.this, "todo: play movie", Toast.LENGTH_SHORT).show();


Intent intent = new Intent(this, VideoPlayer.class);
intent.putExtra("VIDEOPATH", path);
startActivity(intent);


}

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

PDF automatically zoom when I click button or link 1 year 4 months ago #12550

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 17
  • Thank you received: 65
Hi,
we can't reproduce the issue with the demo project. Can you?
If yes, can you please tell us the steps to reproduce it?
If no, can you please send us a sample project with that issue?

Thanks.

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

PDF automatically zoom when I click button or link 1 year 4 months ago #12551

  • rachnasagar
  • rachnasagar's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 69
  • Thank you received: 0
I am sending you the video which is showing what
is happening

www.sendspace.com/file/f0dtbz


Plz download it and check

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

Last edit: by rachnasagar.

PDF automatically zoom when I click button or link 1 year 4 months ago #12552

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 17
  • Thank you received: 65
Hi,
I suggest you to do as in the demo project and modify PDFLayoutView.onSizeChanged as following:
@Override
 protected void onSizeChanged( int w, int h, int oldw, int oldh )
 {
  super.onSizeChanged(w,h,oldw, oldh);
  if(m_layout != null && m_status != STA_ANNOT && w > 0 && h > 0)
  {
   m_layout.vResize(w, h);

   if( m_goto_pos != null )
   {
    m_pageno = m_goto_pos.pageno;
    m_layout.vSetPos(0, 0, m_goto_pos);
    m_goto_pos = null;
    invalidate();
   }

   m_layout.vZoomSet(m_layout.vGetWidth()/2, m_layout.vGetHeight()/2, m_layout.vGetPos(0,0), 1);
   PDFGotoPage(m_pageno);
  }
 }

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

  • Page:
  • 1
Powered by Kunena Forum