zoom and pan getting cut - 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: zoom and pan getting cut

zoom and pan getting cut 3 years 4 months ago #7957

  • asliyanage
  • asliyanage's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 100
  • Thank you received: 0
I have viewpager with fragments.In each fragments i have one page pdf file.I used radaeepdf library to open a pdf files on each fragments.But when i try to zoom and pan to the edges of pdf file it moves to the next pdf page.but i i don't need to move to other page,i need to see the other part of the pdf file.

this is the page which is in normal
normal

This is the photo after i zoom the pdf and it hide the corners and i can see the next pdf edges.
zoomed

I think when i try to zoom and pan withing the pdf file viewpager think i am trying to move to next page.

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

Last Edit: by Docrishav.

zoom and pan getting cut 3 years 4 months ago #7978

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 789
  • Karma: 20
  • Thank you received: 58
You need to block the viewpager navigation while zooming

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

zoom and pan getting cut 3 years 4 months ago #7982

  • asliyanage
  • asliyanage's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 100
  • Thank you received: 0
this is not happen while zooming.After zooming i try to panning to see the cutting parts.When i try it vertically it works fine.I am able to see the all parts of pdf which are above and and below.But if i try to pan horizontally it trys to move to next page in view pager.I don't need to move until i see all parts of pdf which are hiddenHow to do this ?

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

zoom and pan getting cut 3 years 4 months ago #7983

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 789
  • Karma: 20
  • Thank you received: 58
Sorry i meant You need to block the viewpager navigation when the zoom scale is > min scale (m_view.VGetScale > m_view.VGetMinScale)

The vertical scroll works because the viewpager does not handle the vertical gestures, the horizontal no as the viewpager has the priority to handle this kind of gestures, so you need to pass it to the pdf viewer.

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

zoom and pan getting cut 3 years 4 months ago #7984

  • asliyanage
  • asliyanage's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 100
  • Thank you received: 0
can you give a way to do this ?I mean ow to transfer the priority to pdf library from viewpager?
or is there a way to increase the size of fragment to adjust to zoomed pdf page.Then we can see the whole pdf without a problem?
Also i already customize the viewpager.So if the pdf is zoomed it disable the swipe to next page when try to move horizontally and if the pdf is in normal size it moves to next page when try to move horizontally.Is there a possibility do this ?

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

Last Edit: by Docrishav.

zoom and pan getting cut 3 years 4 months ago #7987

  • asliyanage
  • asliyanage's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 100
  • Thank you received: 0
finally i added below methos inside the PDFReader class.Then i am calling this method inside computeScroll() methos in PDFReader.Then i call this method from onInterceptTouchEvent in ViewPager and returns true or fasle based on resualt.

public void isPdfSwipeable() {

if (m_view.vGetScale() == m_view.vGetMinScale()) {
status= true;
} else {
status =false;
}
}

Now i am able to see whole pdf file when the file is zoomed.But the swipe is working only when the pdf is normal size.Because i returns false when the pdf is zoomed inside onInterceptTouchEvent.So i need to swipe when the pdf is zoomed and it comes to an edge.So how to identify that it comes to and end?

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

  • Page:
  • 1
Powered by Kunena Forum