RadaeePDF.com :: Topic: Zoom to column width (1/1)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: Zoom to column width

Zoom to column width 2 years 8 months ago #7690

  • dashti
  • dashti's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
  • Karma: 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.
The administrator has disabled public write access.

Zoom to column width 2 years 8 months ago #7693

  • Davide
  • Davide's Avatar
  • OFFLINE
  • Moderator
  • Posts: 663
  • Thank you received: 43
  • Karma: 12
Hi,
there is no API to achieve this equipement.

Double tap zoom and center the zoom based on the tapped position.
The administrator has disabled public write access.

Zoom to column width 2 years 8 months ago #7701

  • dashti
  • dashti's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
  • Karma: 0
So, how should I do zoom "based on tapped position"? How I can find out the proper zoom level?
The administrator has disabled public write access.

Zoom to column width 2 years 8 months ago #7705

  • Davide
  • Davide's Avatar
  • OFFLINE
  • Moderator
  • Posts: 663
  • Thank you received: 43
  • Karma: 12
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.
The administrator has disabled public write access.

Zoom to column width 2 years 8 months ago #7761

  • dashti
  • dashti's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
  • Karma: 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.
The administrator has disabled public write access.
Powered by Kunena Forum