- Posts: 10
- Thank you received: 0
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 to column width
IP: 192.168.0.71
11 years 10 months ago #7690
by dashti
Zoom to column width was created by dashti
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.
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.
IP: 192.168.0.156
11 years 10 months ago #7693
by Davide
Replied by Davide on topic Zoom to column width
Hi,
there is no API to achieve this equipement.
Double tap zoom and center the zoom based on the tapped position.
there is no API to achieve this equipement.
Double tap zoom and center the zoom based on the tapped position.
IP: 192.168.0.71
11 years 10 months ago #7701
by dashti
Replied by dashti on topic Zoom to column width
So, how should I do zoom "based on tapped position"? How I can find out the proper zoom level?
IP: 192.168.0.156
11 years 10 months ago #7705
by Davide
Replied by Davide on topic Zoom to column width
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.
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.
IP: 192.168.0.71
11 years 10 months ago #7761
by dashti
Replied by dashti on topic Zoom to column width
Hi,
I can see the following code in PDFReader.java
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.
I can see the following code in PDFReader.java
Code:
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.
Time to create page: 0.404 seconds