Open Papabrose opened 7 years ago
simple enough, see below.
float MAXIMUM_ZOOM = 10; float MINIMUM_ZOOM = 1;
Hi thank you for the quick response!
Would I use the "setMaxZoom" and "setMinZoom" methods to do this?
Edit:
I tried
pdfView.setMaxZoom(10);
pdfView.setMinZoom(1);
but it didn't work.
@1stmetro anymore thoughts on this? I still couldn't get this to disable zooming out
grab the source edit constants file for pinchZoom, min mid max zoom is double taps
can something be put into the framework so that I don't have to download the source and make edits myself to it? I would prefer not to have to manage the library myself. Thanks!
Just use Constants.Pinch.MAXIMUM_ZOOM and MINIMUM_ZOOM
I apologize, I'm not sure what you mean but "Just use Constants.Pinch.MAXIMUM_ZOOM and MINIMUM_ZOOM" Just use them how? Do I set them some how or do I use them in a set method somewhere? An example would be helpful. Thanks in advance!
Sorry, in version 2.5.0 you can do it even easier, set Constants.Pinch.MAXIMUM_ZOOM and MINIMUM_ZOOM to desired values
If there is more than one pdf viewers all the pdf viewers affect when set Constants.Pinch.MAXIMUM_ZOOM and MINIMUM_ZOOM. How can i disable only one view's zoom? if you can provide some access to DragPinchManager class enable() disable() methods via PDFView class . we may be able to disable the pinch zoom ... If you can make
private DragPinchManager dragPinchManager;
in PDFView class to
public DragPinchManager dragPinchManager;
or put some getter to PDFView class i may me able to disable the zoom
You create multiple pdfvew and reference to one pdfview
I have two pdf views. one for display thumbnails and one for display page. i want to disable the zoom functionality in thumbnail view. When i set Constants.Pinch.MAXIMUM_ZOOM and MINIMUM_ZOOM . It will affect on both pdf views.
I think downloading the library and modifying it according to your preferences is the best option.
+1, need enableZoom interface.
or you can setOnTouchListener to null, if you are simply just displaying the pdf without interaction.
pdfView.setOnTouchListener(null);
Add this code in onCreate: Constants.Pinch.MINIMUM_ZOOM = 1; Constants.Pinch.MAXIMUM_ZOOM = 1;
For disable double tap: pdfView.fromAsset(SAMPLE_FILE) ....... .enableDoubletap(false) .load();
Hello,
Maybe I'm not sure of how to do it but I'm trying to open a PDF document zoomed in to pageWidth and then I want to make it so the user can not zoom out anymore but can only zoom in. Is this possible with the current code or is that something you would have to add?
Thanks