RadaeePDF.com :: Topic: zoom and pan getting cut (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: zoom and pan getting cut

zoom and pan getting cut 2 years 11 months ago #7957

  • asliyanage
  • asliyanage's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 100
  • Karma: 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.
Last Edit: 2 years 11 months ago by Docrishav.
The administrator has disabled public write access.

zoom and pan getting cut 2 years 11 months ago #7978

  • nermeen
  • nermeen's Avatar
  • OFFLINE
  • Moderator
  • Posts: 709
  • Thank you received: 49
  • Karma: 18
You need to block the viewpager navigation while zooming
The administrator has disabled public write access.

zoom and pan getting cut 2 years 11 months ago #7982

  • asliyanage
  • asliyanage's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 100
  • Karma: 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 ?
The administrator has disabled public write access.

zoom and pan getting cut 2 years 11 months ago #7983

  • nermeen
  • nermeen's Avatar
  • OFFLINE
  • Moderator
  • Posts: 709
  • Thank you received: 49
  • Karma: 18
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.
The administrator has disabled public write access.

zoom and pan getting cut 2 years 11 months ago #7984

  • asliyanage
  • asliyanage's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 100
  • Karma: 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 ?
Last Edit: 2 years 11 months ago by Docrishav.
The administrator has disabled public write access.

zoom and pan getting cut 2 years 11 months ago #7987

  • asliyanage
  • asliyanage's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 100
  • Karma: 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?
The administrator has disabled public write access.
Powered by Kunena Forum