Last page not center alligned click on thumb - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC: Last page not center alligned click on thumb

Last page not center alligned click on thumb 4 years 10 months ago #4816

  • sahli.wa.skumar
  • sahli.wa.skumar's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 0
hi,

When click on last page thumb nail the last page shows up on screen which is not center alligned it is always right alligned.
im using

defView =3; in PDFview class

and below code
case 3:
//for dual view
// m_view = [[PDFVDual alloc] init:false :NULL :0 :NULL :0];
//m_view = [[PDFVVert alloc] init];

//for single view
m_view = PDFVDual alloc] init:false :NULL :0 :verts :[m_doc pageCount;

Please suggest.

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

Last edit: by PIAMO.

Last page not center alligned click on thumb 4 years 10 months ago #4923

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 516
  • Karma: 15
  • Thank you received: 56
Hi,

to solve this issue you can edit vGoto method, in PDFView.m file:

-(void)vGoto:(int)pageno
{
struct PDFV_POS pos;

pos.x = 0;
pos.y = [m_doc pageHeight:pageno];
pos.pageno = pageno;
if (pageno >= (m_doc.pageCount - 1))
[m_view vSetPos:&pos :[m_doc pageWidth:pageno]/2 :0];
else
[m_view vSetPos:&pos :0 :0];


[m_view vGetDeltaToCenterPage:pos.pageno :&m_swipe_dx :&m_swipe_dy];
[self refresh];
}

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

Last page not center alligned click on thumb 4 years 10 months ago #4945

  • sahli.wa.skumar
  • sahli.wa.skumar's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 0
That worked:-)

Thank you!!!

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

  • Page:
  • 1
Powered by Kunena Forum