Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

zoom controled by external buttons

More
IP: 192.168.0.71 9 years 2 months ago #12585 by biadeo
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.
More
IP: 192.168.0.71 9 years 2 months ago #12586 by Davide
Hi,
I suggest you to look at this method to handle zoom level :
Code:
vZoomSet(int, int, PDFLayout.PDFPos, float)
You can see how to use it in OnPDFDoubleTapped method of PDFViewAct.
More
IP: 93.34.225.185 8 years 4 months ago #13794 by mfranc28
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;
More
IP: 37.183.44.177 8 years 4 months ago #13798 by nermeen
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.
Code:
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.
More
IP: 93.34.225.185 8 years 4 months ago #13799 by mfranc28
Ok, when did you plan next release? In this release there is only this feature or something else?
More
IP: 37.183.44.177 8 years 4 months ago #13804 by nermeen
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.
Time to create page: 0.451 seconds
Powered by Kunena Forum