Read PDF file in iPhone Simulator

Leave a Comment

For Read PDF file we need a pd furl or pdf file in our application resources and we can read this pdf in webview-

Pdf.h file
@interface {
  UIWebview *webview;
NSUrl *pdfurl;
}

Pdf.m file
-(void)Viewdidload {
[super viewdid load];
Pdfurl=[NSUrl filewithpath:[[NSBundlw main bundle]pathforResources:@"about iphone sdk" atType:@"pdf"]];
[webview loadRequest:[NSUralRequest Requestwithurl:pdfurl]];
}
-(void)deadlock{
[webview release];
[pdfurl release];
[super release];
}

0 comments:

Post a Comment