Re: reading text rom Pages doc
Re: reading text rom Pages doc
- Subject: Re: reading text rom Pages doc
- From: Charles Srstka <email@hidden>
- Date: Mon, 8 Mar 2010 16:08:41 -0600
On Mar 8, 2010, at 10:12 AM, Ruedi Heimlicher wrote:
> Hi
> Thanks for all advices. I found a workarround to open and read the file with applescript. This is also possible from within Xcode, but very pedantically. I only have to read in some names from a list. No interest in text attributes. I offer the user to import name lists as .doc and .txt files and wanted to add also .pages files.
> I just wonder why there is no function in Cocoa to import such text as it is possible with MS files.
> Ruedi Heimlicher
The Pages ’09 format includes a QuickLook/Preview.pdf file inside the ZIP archive. If you fed this into PDFDocument and then called its -string method, you could get the raw text of the document. However, this is, of course, somewhat messy, and could easily break if Apple changes the format such that it no longer includes that PDF file.
Charles_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden