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, PDFSetPos & pages

More
IP: 192.168.0.71 8 years 10 months ago #12374 by davred
I opened a document with
Code:
PDFOpen(m_doc, this)
next I zoom in with
Code:
PDFZoom(..)
now, with OnTouch event I want to "move" inside the document:
Code:
.... switch (event.getAction()) { case MotionEvent.ACTION_DOWN: pp = pdfView.PDFGetPos((int) event.getX(), (int) event.getY()); break; case MotionEvent.ACTION_MOVE: pdfView.PDFSetPos(pp, (int) event.getX(), (int) event.getY()); break; } .......

I'm able to moving inside the document but if I go to right the reader show me the next page.

Is there a method to block the view only to the current page?
More
IP: 192.168.0.71 8 years 10 months ago #12377 by nermeen
Replied by nermeen on topic zoom, PDFSetPos & pages
You can check the below articles, one for the PDFLayoutDual and one for the deprecated PDFViewDual
  1. Avoid page change during navigation while zoomed (Android)
  2. How to avoid page change during navigation if page is zoomed? (Deprecated)
More
IP: 192.168.0.71 8 years 10 months ago #12378 by davred
Replied by davred on topic zoom, PDFSetPos & pages
Thank you.
But to use ExtendedDualLayout i need to Override PDFSetView.
What is the best way to mantain unthached the libray?
To Override the method I need that some var are declared protected and not private
More
IP: 192.168.0.71 8 years 10 months ago - 8 years 10 months ago #12379 by nermeen
Replied by nermeen on topic zoom, PDFSetPos & pages
You can create a class that extends PDFLayoutView and overrides PDFSetView
For the private variables, you can override the methods that set these variables to save an instance of their values, or you can use your own values based on the variables and your requirements.
Last edit: 8 years 10 months ago by nermeen.
More
IP: 192.168.0.71 8 years 10 months ago #12380 by davred
Replied by davred on topic zoom, PDFSetPos & pages
If i override PDFSetView i need access to
  • m_rtol
  • m_goto_pos
  • m_bmp_format
  • m_doc
For m_doc i can override PDFOpen when it is set and get its value.
But for the others vars?
More
IP: 192.168.0.71 8 years 10 months ago #12381 by nermeen
Replied by nermeen on topic zoom, PDFSetPos & pages
The same idea:
  • m_rtol -> currently it's always false, from the next version it will be moved to Globlal class, so you can set it based on your configuration parameter
  • m_goto_pos -> override PDFGotoPage to save an instance
  • m_bmp_format -> override PDFSetBmpFormat
Time to create page: 0.412 seconds
Powered by Kunena Forum