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

How to use VSetPos and GoToPage

More
IP: 192.168.0.71 11 years 8 months ago #6466 by ppanda15
Hi,

I really new on Android development, and this might be a stupid question. How to use VSetPos? I read in the document and tried to start the document to the specific page and specific position on that page. However, I tried using VSetPos but nothing happened.

Second, about GoToPage, where is the best place should I put it into my code to make the document starts and go to the specific page I want? (now I put it on OnDraw() and add flag to make it be called only one time).

Lastly, how to get the current page, or should I calculate by current position divided by page height?

Thank you in advance for answers. ;)
More
IP: 192.168.0.158 11 years 8 months ago #6467 by nermeen
To go to certain position try:
Code:
m_reader.vSetScale(m_reader.vGetScale(), x, y);

To open the pdf on a certain page:
Code:
m_reader.PDFOpen(m_doc, false, this); m_reader.PDFGotoPage(10);

to get the current page:
You can get it from OnPageChanged when you implement PDFReaderListener, or you can add a get method in PDFReader for the value of the variable m_pageno
More
IP: 192.168.0.71 11 years 8 months ago - 11 years 8 months ago #6472 by ppanda15
Thank you for your reply, @nermeen. :)
Last edit: 11 years 8 months ago by thuc.
Time to create page: 0.475 seconds
Powered by Kunena Forum