- Posts: 3
- 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
Scroll pdf in android programmatically
- _dharashah_
- Topic Author
- Offline
- New Member
-
Less
More
IP: 192.168.0.71
11 years 8 months ago #6812
by _dharashah_
Scroll pdf in android programmatically was created by _dharashah_
Hi,
Thank you for this library. I have an issue in android, where the scenario is this: I have two tablets of the same resolution, where by i scroll the pdf on one tablet and using this
i get the x and y coordinates, when i use the following on the second tablet in code:
I do not seem to scroll the pdf programmatically
. could any one please assist on how to scroll the pdf. and what actual values to use in order to scroll it programmatically.
Please assist.
Thanking you
Thank you for this library. I have an issue in android, where the scenario is this: I have two tablets of the same resolution, where by i scroll the pdf on one tablet and using this
Code:
xx = m_view.vGetX();
yy= m_view.vGetY();
Code:
PDFPos pos = m_view.vGetPos(Integer.parseInt(left),Integer.parseInt(top));
m_view.vSetPos(pos, Integer.parseInt(left), Integer.parseInt(top));
Please assist.
Thanking you
IP: 192.168.0.156
11 years 8 months ago #6819
by Davide
Replied by Davide on topic Scroll pdf in android programmatically
Hi,
you can try this to scroll the pdf:
and you have to take into account the scale!
Check this:
www.androidpdf.mobi/forum/Android-develo...ew-area-android#5007
you can try this to scroll the pdf:
Code:
m_scroller = new Scroller(context);
...
m_scroller.setFinalX(newX);
m_scroller.setFinalY(newY);
m_scroller.computeScrollOffset();
and you have to take into account the scale!
Check this:
www.androidpdf.mobi/forum/Android-develo...ew-area-android#5007
- _dharashah_
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
IP: 192.168.0.71
11 years 8 months ago #6821
by _dharashah_
Replied by _dharashah_ on topic Scroll pdf in android programmatically
Hi,
Thank you for this answer, but could you please guide me as to how to add this scroller to the pdfview ?
Thank you for this answer, but could you please guide me as to how to add this scroller to the pdfview ?
IP: 192.168.0.156
11 years 8 months ago #6824
by Davide
Replied by Davide on topic Scroll pdf in android programmatically
Hi,
you can create a public void in PDFView class..
Something like this:
and call it in your PDFReader class where you want and with the values you want:
you can create a public void in PDFView class..
Something like this:
Code:
public void vScrollPDF(int newX, int newY){
if(m_scroller != null){
m_scroller.setFinalX(newX);
m_scroller.setFinalY(newY);
m_scroller.computeScrollOffset();
}
}
and call it in your PDFReader class where you want and with the values you want:
Code:
m_view.vScrollPDF(0, 1000);
- _dharashah_
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
IP: 192.168.0.71
11 years 8 months ago #6825
by _dharashah_
Replied by _dharashah_ on topic Scroll pdf in android programmatically
I am afraid i will not be able to access the PDFView class because its a jar
and this version is the standard version that i am using. Is there a way i could access this class?
IP: 192.168.0.156
11 years 8 months ago #6827
by Davide
Replied by Davide on topic Scroll pdf in android programmatically
You have to buy a Professional License or a Premium License to edit PDFView class!
Time to create page: 0.443 seconds