I’m trying to scroll the pdf file by page
here is my code
-(void)viewDidLoad{
NSString *path = [[NSBundle mainBundle] pathForResource:@"myPdffile" ofType:@"pdf"];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *urlrequest = [NSURLRequest requestWithURL:url];
[webview loadRequest:urlrequest];
webview.scalesPageToFit = YES;
[super viewDidLoad];
}
//goto next page
-(IBAction)nextpage{
[webview stringByEvaluatingJavaScriptFromString: ?????? ];
}
//goto previous page
-(IBAction)prevpage {
?????
}
what should i put after stringByEvaluatingJavaScriptFromString?
do i put same code in “prevpage”?
thanks!
In iOS 5 you can use this statement for page jumping
and in below iOS 5 you can use this statement
Where y is the height where you’re going to jump.
Here i am writing some sample code for next and previous page
For previous page:
in above sample code isIOSAbove4 is defined in pch file
Hope above code will solve your problem