Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 09-21-2009, 06:46 PM   #14 (permalink)
rmonson
Registered Member
 
Join Date: Sep 2009
Posts: 10
Default

Quote:
Originally Posted by sukumar_77 View Post
If you are adding a pdf file as a resource file, then following code can be used.


Code:
NSString *pdfPath = [[NSBundle mainBundle] pathForResource:@"pdfFileName" ofType:@".pdf"];

NSURL *pdfURL = [NSURL URLWithString:pdfPath];
This works well but you have to remove the dot (".") from the file type or it doesn't work. so the "ofType" parameter should be as follows:

ofType:@"pdf"

Notice the dot is missing.
rmonson is offline   Reply With Quote
 

» Advertisements
» Online Users: 366
21 members and 345 guests
ADY, bobli, Dani77, Duncan C, ghost, HDshot, HemiMG, ilmman, MarcoAlmeida, MarkC, Meoz, ngaikwad, Punkjumper, Raffaello, Robiwan, Rudy, themathminister, timle8n1, wilky94
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,877
Threads: 89,223
Posts: 380,728
Top Poster: BrianSlick (7,129)
Welcome to our newest member, peterkessler45
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:46 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.