Zoom to column width - 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 to column width

Zoom to column width 3 years 5 months ago #7690

  • dashti
  • dashti's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
Hi,
I'm developing an android application using PDF SDK while I need to zoom to a specific text column. E.g. in a two column page, if you double tap on a column, the reader should zoom to fit that column. How this is possible with PDF SDK?
Thanks in advance.

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

Zoom to column width 3 years 5 months ago #7693

  • Davide
  • Davide's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 773
  • Karma: 16
  • Thank you received: 60
Hi,
there is no API to achieve this equipement.

Double tap zoom and center the zoom based on the tapped position.

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

Zoom to column width 3 years 5 months ago #7701

  • dashti
  • dashti's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
So, how should I do zoom "based on tapped position"? How I can find out the proper zoom level?

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

Zoom to column width 3 years 5 months ago #7705

  • Davide
  • Davide's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 773
  • Karma: 16
  • Thank you received: 60
Hi,
this is the zoom's standard behaviour.
If you want to increase the zoom you have to modify the zoomLevel in default_config() void in Global class (max 5).
With this m_view.vGetScale(); you can get the current scale.
With this m_view.vGetMaxScale(); you can get the max scale.
With this m_view.vGetMinScale(); you can get the min scale.

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

Zoom to column width 3 years 5 months ago #7761

  • dashti
  • dashti's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0
Hi,

I can see the following code in PDFReader.java
public boolean OnPDFDoubleTapped(float x, float y)
	{
		if( m_status != STA_NORMAL ) return false;
		m_view.vSetScale(m_view.vGetScale() + Global.zoomStep, x, y);
		return true;
	}

This is default action of double tap to increase zoom level. My point is how to find the proper zoom scale to be passed to vSetScale, based on the content width of the position where the user has touched the screen.

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

  • Page:
  • 1
Powered by Kunena Forum