Tutorial details

Displaying  A PDF File | App Code for Sale | Preview

Displaying A PDF File | iOS Tutorial

How to display PDF files in webviews in your app

Overview PAGE TOP

Reference: http://www.geekylemon.com/xcode-pdf-file

In this tutorial i will be showing you how to display PDF files in webviews in your app


  • 1 PDF File
  • 1 Webview

Displaying PDF files in your app is a great way to show the user forms or any other document easy in your app from the use of a webview

ViewController.h PAGE TOP

@interface ViewController : UIViewController  {
IBOutlet UIWebView *Webview;

ViewController.m PAGE TOP

@implementation ViewController
- (void)viewDidLoad
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSString *path = [[NSBundle mainBundle] pathForResource:@"PdfFile" ofType:@"pdf"];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[Webview loadRequest:request];
[Webview setScalesPageToFit:YES];

Reference PAGE TOP


0 Comments Leave a comment

Please login in order to leave a comment.

Newest first

to your Chupamobile Account.

The Easiest way to Launch your next App or Game.

Join Chupamobile and get instant access to thousands of ready made App and Game Templates.

Creating an account means you’re okay with Chupamobile’s Terms of Service and Privacy Policy.