zoom problem - 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

TOPIC: zoom problem

zoom problem 5 years 4 months ago #3362

  • truculent
  • truculent's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 0
hi :) our problem almost solve [our reader ready for connect to our app for release]!
but we have bad problem :D :) [annot ok - thumbnail ok - all of feature are okay]
but zoom not work as well !
some time when pinching for zoom , zoomin not happened :(
another problem when open a pdf & zoom it then want too read right side of content it going to another page or bugyy :(

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

zoom problem 5 years 4 months ago #3389

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 525
  • Karma: 20
  • Thank you received: 60
hi,

to solve your problem with swipe when a page is zoomed, you can modify vGetDeltaToCenterPage method in PDFV.m file.

Something like:

-(void)vGetDeltaToCenterPage:(int)pageno : (int *)dx : (int *)dy
{
if( m_pages == NULL || m_doc == NULL || m_w <= 0 || m_h <= 0 || m_scale > m_scale_min) return;
struct PDFCell *ccur = m_cells;
struct PDFCell *cend = ccur + m_cells_cnt;

....
}

with this solution you execute this method only when a page is not zoomed
The following user(s) said Thank You: patel_patel_patel

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

zoom problem 5 years 4 months ago #3403

  • truculent
  • truculent's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 0
thank you :)

but is there anyway for fix when a page zoomed & can to goto another page with swipe ? [but not Like LAst tht buggy :) ]

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

zoom problem 5 years 4 months ago #3430

  • truculent
  • truculent's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 0
my last question not answered yet :(

i have another problem !
but it's very very funny!
some time zoom not work but really really happened some times :(
& it's very bad :(
we fix all of problem with your help :) but zoom [basic feature not work well ]!

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

zoom problem 5 years 4 months ago #3456

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 525
  • Karma: 20
  • Thank you received: 60
I found a possible solution for your problem: I add a BOOL variable to vGetDeltaToCenterPage, like this:

-(void)vGetDeltaToCenterPage:(int)pageno :(int *)dx :(int *)dy :(BOOL)swiping;

and in .m file I change the method implementation:

-(void)vGetDeltaToCenterPage:(int)pageno : (int *)dx : (int *)dy :(BOOL)swiping
{
if (!swiping) {
if( m_pages == NULL || m_doc == NULL || m_w <= 0 || m_h <= 0 || m_scale > m_scale_min) return;
}

PDFVPage *vpage = m_pages[pageno];
int left = [vpage GetX] - m_page_gap/2;
int top = [vpage GetY] - m_page_gap/2;
int w = [vpage GetWidth] + m_page_gap;
int h = [vpage GetHeight] + m_page_gap;
int x = left + (w - m_w)/2;
int y = top + (h - m_h)/2;
*dx = x - m_x;
*dy = y - m_y;
}

Now you have to set boolean to YES only in onSwipe method calls, with the exception of last call to vGetDeltaToCenterPage; in the other calls you have to set boolean to NO.

In this way when a page is zoomed you can go to next/prev page with swipe

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

zoom problem 5 years 4 months ago #3474

  • truculent
  • truculent's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 64
  • Thank you received: 0
hi dear emanuele :)
in your PDFV you have 2 method vGetDeltaToCenterPage 1 on of them for @interface PDFVDual: PDFV
another for @interface PDFV : NSObject !
i changed for @interface PDFV : NSObject
-(void)vGetDeltaToCenterPage:(int)pageno : (int *)dx : (int *)dy :(BOOL)swiping;
{

if (!swiping) {
if( m_pages == NULL || m_doc == NULL || m_w <= 0 || m_h <= 0 || m_scale > m_scale_min) return;
}

PDFVPage *vpage = m_pages[pageno];
int left = [vpage GetX] - m_page_gap/2;
int top = [vpage GetY] - m_page_gap/2;
int w = [vpage GetWidth] + m_page_gap;
int h = [vpage GetHeight] + m_page_gap;
int x = left + (w - m_w)/2;
int y = top + (h - m_h)/2;
*dx = x - m_x;
*dy = y - m_y;
swiping = NO;
}


& all in all of call this method in onSwip method pass YES for swiping ! & in all of call [expect onswipe] pass NO to this method! it's work but not good ;( [we use double page Right view mode ] ---> not doual page only on page show & we customize when rotate againe only page show !
i send you my PDFV classes. please check it ! it think some thing going wrong!

truculent.dl.rapidpars.com/17843/1979443/cnnu87920pm/PDFV.zip
please help me

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

Powered by Kunena Forum