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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-26-2009, 08:57 AM   #1 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 4
Dotnaught is on a distinguished road
Default How to Embed a PDF in an App?

Hi,

Does anyone have any advice about the best class to use to embed a PDF (or text file) in an iPhone app?

Can I use a UIWebView to display an embedded PDF and handle scrolling and resizing? Would a Quartz class be better? Something else?

Basically I'm looking to write an e-book viewer for an embedded file as a simple first project.

Thanks.
Dotnaught is offline   Reply With Quote
Old 01-26-2009, 09:48 AM   #2 (permalink)
Registered Member
 
Join Date: Jun 2008
Posts: 61
raju is an unknown quantity at this point
Default

Quote:
Originally Posted by Dotnaught View Post
Hi,

Does anyone have any advice about the best class to use to embed a PDF (or text file) in an iPhone app?

Can I use a UIWebView to display an embedded PDF and handle scrolling and resizing? Would a Quartz class be better? Something else?

Basically I'm looking to write an e-book viewer for an embedded file as a simple first project.

Thanks.

Hello,

You can use the UIWebView to display the PDF.

Thanks,
Raju.
raju is offline   Reply With Quote
Old 01-26-2009, 12:06 PM   #3 (permalink)
Registered Member
 
RickMaddy's Avatar
 
Join Date: Oct 2008
Location: Denver, CO
Posts: 2,121
RickMaddy will become famous soon enough
Default

The QuartzDemo sample app shows how to display a PDF.
RickMaddy is offline   Reply With Quote
Old 01-26-2009, 11:08 PM   #4 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 4
Dotnaught is on a distinguished road
Default Quartz

Thanks, all.

The Quartz demo does something odd in that if you swap out the embedded PDF file name with another one that's been added to the project, you get a black page. It may have something to do with localization since the QuartzImageDrawing.pdf has an (en) child.

Since I'm stumped, I'll probably just try UIWebView.
Dotnaught is offline   Reply With Quote
Old 01-27-2009, 01:31 AM   #5 (permalink)
New Member
 
Join Date: Sep 2008
Posts: 28
hohlsen is on a distinguished road
Default

Quote:
Originally Posted by Dotnaught View Post
Thanks, all.

The Quartz demo does something odd in that if you swap out the embedded PDF file name with another one that's been added to the project, you get a black page. It may have something to do with localization since the QuartzImageDrawing.pdf has an (en) child.

Since I'm stumped, I'll probably just try UIWebView.
I had the same issue when I tried some different PDFs than the one that came with the demo. Unfortunately, nobody replied to my post, either. I want a bit more control than a UIWebView provides, so that doesn't work for me.

I've basically given up for the time being, until I can find an answer to how one displays an arbitrary PDF properly.
hohlsen is offline   Reply With Quote
Old 09-14-2010, 04:12 PM   #6 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 37
Smokin Joe is on a distinguished road
Default

Quote:
Originally Posted by hohlsen View Post
I had the same issue when I tried some different PDFs than the one that came with the demo. Unfortunately, nobody replied to my post, either. I want a bit more control than a UIWebView provides, so that doesn't work for me.

I've basically given up for the time being, until I can find an answer to how one displays an arbitrary PDF properly.
It depends on how the file is stored - whether it is within the Simulator's/Phone's "Documents" folder, or whether the .pdf file was placed in as a Project Resource.

That could be the issue.
Smokin Joe is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 387
10 members and 377 guests
chits12345, ChrisYates, fiftysixty, fredidf, gmarro, KennyChong, Leslie80, Meoz, ryantcb, Yosh_K
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,670
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Yosh_K
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:28 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0