tags:

views:

3375

answers:

6

I want to make a small app that displays a PDF, presenting zoom-able single pages with a previous-next page function.

A: 

To start with, you need to get a copy of the PDF standard document. This will tell you everything you need to know about reading a PDF file. Then you just* need to convert the document content into an image to be displayed on the target device and add some GUI controls to allow navigation through the document.

*sarcasm not intentional

workmad3
Why on earth would you do all that when the iPhone supports PDFs natively?
dancavallaro
Being a smart-ass is a waste of your time and everyone else's time.
Alex Reynolds
A: 

The iPhone and iPod touch can view PDFs already, as one of the TV adverts in the UK shows an email with a .pdf attachment (of swimming lessons) being viewed. It can also view .doc, .xls, and so on, so if he is creating a viewer type application then supporting those as well could be a nice feature addition later on.

This means there is a PDF framework on these devices that you will need to access. Presumably Apple can provide support here if he is a paid up developer. Syncing the PDFs to the device is the actual real difficulty, as this isn't supported by iTunes. I assume that you would need to write a network based synchronisation tool, or have an online cloud for holding people's PDFs.

The device doesn't support Flash, so using PDF to Flash conversion tools will not work.

JeeBee
+1  A: 

This is pretty trivial. The CGPDFDocument functions will allow you to do anything you'd want to do with a PDF file.

Mark Bessey
+14  A: 

The Core Graphics API is pretty much the same in Cocoa and Cocoa touch. Read up on CGPDFDocument, it should provide you with everything you will need to render PDF pages. You won't need to read the PDF spec or use a library to parse PDF files directly. You will probably to learn more about Core Graphics / Quartz 2D / etc. to understand how to use those functions inside of a Cocoa app.

benzado
+1  A: 

Based on the gradually evolving Apple policy of rejecting application submissions that duplicate functionality already on the iPhone I would worry about spending too much time even as a newbie on something that is part of the core iPhone feature-set.

Shaun Austin