Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

How to use VSetPos and GoToPage 10 years 10 months ago #6466

  • ppanda15
  • ppanda15's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 9
  • Thank you received: 0
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. ;)

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

How to use VSetPos and GoToPage 10 years 10 months ago #6467

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
To go to certain position try:
m_reader.vSetScale(m_reader.vGetScale(), x, y);

To open the pdf on a certain page:
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
The following user(s) said Thank You: thuc

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

How to use VSetPos and GoToPage 10 years 10 months ago #6472

  • ppanda15
  • ppanda15's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 9
  • Thank you received: 0
Thank you for your reply, @nermeen. :)

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

Last edit: by thuc.
  • Page:
  • 1
Powered by Kunena Forum