I'm curious to know whether the PDFKit framework is available for use within the iPhone OS, in order to build a PDF reader a bit more sophisticated than the one available by simply opening PDF documents with UIWebView.
Just wondering if this is an option or not.
Grab the official sample code called QuartzDemo which has an example on how to manipulate a PDF file using Quartz graphics. The output seems faster than the UIWebView.
The PDFKit is not available on iPhone at this time. Certainly the functionality is there, but Apple has not opened it up in an available framework. You should file a bug on this if you'd like to see it in the future.
If you want more control over PDF, there are many ways to manipulate PDF content using Quartz graphics.
Related
In my application i need to launch ppt , xls, pdf files. i am sure, iOS Framework support to view PDF files without launching any other application, but is there any way to open ppt , xls doc , if yes please give me any pointer,
I believe, there should be some SDKs available , which can be integrated through an application and can make use of it.
If you just want to view the Office files, have a look at:
Document Interaction Programming Topics for iOS: Quick Look Framework.
Quick Look Framework Reference
Quick Look Framework supports a lot of file formats as you can see in the links above. It is available in iOS 4.0 and later.
You can also use UIWebView to display them. See Using UIWebView to display select document types.
I found CGPDFDocumentRef that should be the way to render pdf's on OSX and iOS. Is it right? Without any other library or Adobe SDK?
Quartz does not implement the complete ISO 32000 PDF standard. For example, iOS devices do not render JPEG2000 compressed images at all.
Yes Quartz can natively render PDFs. See the quartz demo sample code
My iPhone app creates PDF files (in Arial font). The plain iPhone 3.1.x version works great (other than the known issue that PDF files created on the iPhone can't be viewed correctly in Google Docs or on the BlackBerry).
As I am updating my project for OS 3.2 and the iPad, it works just the same, and the PDF files still look great on the iPhone, iPad and Mac OS X (Preview app). But now on Windows (Vista), Acrobat 9.3.1 says "Cannot extract the embedded font 'XYZABC+ArialMT'. Some characters may not display or print correctly".
And in fact Acrobat then uses some generic font instead of Arial (or whatever other font I try).
Quartz 3.2 seems to generate these "random" embedded font names each time it creates a PDF file (the XYZABC changes around each time). I can't tell whether the problem is just the somewhat strange "temporary" embedded font name with the plus sign, or the way Quartz 3.2 is embedding fonts.
I have tried my existing code (using CGPDFContext* functions), and also the newly supported UIGraphics* functions, with the same results.
How can PDF files be created on the iPad to display correctly on Windows?
Important update: as of iOS 4.2, Apple have fixed the bug I reported; PDFs generated from Quartz on iOS now contain correctly embedded fonts. I am leaving the remainder of this answer as-is, but do not use this mechanism on iOS 4.2 or later.
Adobe Reader is correctly, if unhelpfully, following the PDF spec. I have investigated this because it was affecting one of my apps and documented my findings here: http://web.archive.org/web/20180909095127/http://blog.nomzit.com/2010/08/18/annoying-bug-in-quartz-pdfcontext-font-handling/
There is a simple workaround documented there which causes Adobe Reader to behave the same as the more helpful alternatives.
I have also reported the bug to Apple
Try to use Foxit Reader for opening your PDF files on Windows instead of Adobe Reader. It worked for me.
Using Pages on an iPad, the same issue occurs. I'd be interested to find an answer:
http://discussions.apple.com/thread.jspa?threadID=2389034&tstart=0
In addition to Phil's analysis, I've found that several Windows users did not have one or more of the standard fonts (like Helvetica) installed. The PDFs generated via Quartz would reference one of these standard fonts, which Adobe Reader would render using the next closest font in its lookup table, leading to odd-looking PDFs. The iPhone / iPad standard system fonts were not being embedded properly, possibly due to what Phil has found in the Quartz-generated PDFs.
In all the cases I ran across, this was solved by having the user install Helvetica (or any other missing font) on their Windows machine, at which point the PDFs would render properly.
I'm looking for a small tutorial that can help me use svg images in iphone application. I'm trying to learn about svg format, and would love to know if there is relevant material from apple out there? particularly, w.r.t. iPhone.
Are there any open source libraries, or frameworks in iPhone SDK 3.0+ for SVG?
Any help is appreciated. Thanks.
Mustafa
The UIWebView class will render SVG files.
To demonstrate this, put your SVG file on the web somewhere and view it with Mobile Safari.
If you need a tutorial on how to use UIWebView, search Google on "UIWebView tutorial".
You might want to check out this project:
https://github.com/splashdust/SVGQuartzRenderer
It enables you to at least get past UIWebView.
I am trying to use Aptana to build an IPhone web application. I've never use Aptana. I downloaded the iphone support and started a new project. It is now asking me if I want to import a javascript library and lists the "big ones." Will IPhone's Safari be able to use these, specifically jquery? I saw that jquery had a special iphone library so my guess is no.
Should I tell it to use jquery (or other library) or should I download the special iphone javascript subset manually and try an integrate it in my project?
As far as I know JQuery should work fine on the iPhone. The specific libraries you are talking about must be additions to take advantage of iPhone only features like being able to handle the display orientation event or maybe use the webkit css animation extensions.
Although you will need to be careful with events since most mouse related events on the iPhone behave a little different from what you might expect. This presentation by PPK offers some clues about it:
http://yuiblog.com/blog/2009/04/27/video-ppk-jsevents/
Yep, iphone should run jquery just fine. The javascript support is surprisingly capable. Although you may want to look at some of the iPhone specific libraries out there. I forget their names. iUI I think?