zoom controled by external buttons - 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 controled by external buttons

zoom controled by external buttons 1 year 5 months ago #12585

  • biadeo
  • biadeo's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
Hello,

Could you please let me know if there is any possibility of controlling the zoom by pressing a zoom-in/ zoom-out button? We want to add these buttons, but we couldn't find any way to control the zoom using the library.

Thank you,
Bianca.

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

zoom controled by external buttons 1 year 5 months ago #12586

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 18
  • Thank you received: 65
Hi,
I suggest you to look at this method to handle zoom level :
vZoomSet(int, int, PDFLayout.PDFPos, float)
You can see how to use it in OnPDFDoubleTapped method of PDFViewAct.

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

zoom controled by external buttons 7 months 1 week ago #13794

  • mfranc28
  • mfranc28's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 25
  • Thank you received: 0
Same problem here.
How I can subscribe to the event?
I have
var btnZoomLevel = FindViewById(Resource.Id.btnZoomCustom);
AttachLabel(btnZoomLevel, LocalizedMessages.ViewerZoomLevel, Resource.Drawable.ZoomCustom);
btnZoomLevel.Click += (sender, e) =>
{ ??????? }

then in my OnPDFDoubleTapped I have

float mCurZoomLevel = p0.VGetZoom();
if (p0.VGetScale() <= p0.VGetMinScale())
Global.ZoomStep = 1;
if ((mCurZoomLevel > Global.ZoomLevel && Global.ZoomStep > 0) ||
(mCurZoomLevel == 1 && Global.ZoomStep < 0)) //reverse zoom step
Global.ZoomStep *= -1;

p0.VZoomSet((int)p1, (int)p2, p0.VGetPos((int)p1, (int)p2), mCurZoomLevel + Global.ZoomStep);
return true;

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

zoom controled by external buttons 7 months 1 week ago #13798

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
Currently the method vZoomSet is not accessible from PDFLayoutView.

You need to modify the java demo project , add the following method to PDFLayoutView, regenerate the aar and replace it into the Xamarin project.
public void PDFSetZoom(int vx, int vy, PDFPos pos, float zoom) {
        if(m_layout != null) m_layout.vZoomSet(vx, vy, pos, zoom);
    }

Note: we will include this method in the next releases.

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

zoom controled by external buttons 7 months 1 week ago #13799

  • mfranc28
  • mfranc28's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 25
  • Thank you received: 0
Ok, when did you plan next release? In this release there is only this feature or something else?

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

zoom controled by external buttons 7 months 1 week ago #13804

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
We doesn't have an exact date now, but maybe it will be by the end of the month.

We are working on other fixes/enhancements.

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

  • Page:
  • 1
Powered by Kunena Forum