Parse .pages and manipulate them on XOJO


Is there any option or way to be able to parse Apple .pages files and be able to play with them from Xojo ?


Rename the .pages document to .zip and extract it.

Inside, you will find previews in Jpeg format.

Then in the Index folder, document.iwa contains the text itself.

You may want to search the Internet for the structure of these files. I could not locate anything in the Apple Library.

MBS Plugins come with a WordFileMBS class, which we use to modify docx files.
So if you would use that format, the class may be useful.

Depends on the file format version. With some work you can create Pages ‘09 files from the scratch with Xojo. They are still supported by Apple Pages (Im-/Export), but Apple changed the default Pages file format in 2013 with encrypted ipa files inside the zip folder.

In my experience I was only able to parse them when the language was in Roman Script.
For texts in Indic scripts (especially when mixed with Roman scripts, as for instance “I go to London ??? ? ???”) I was more or less never able to get the Indic words.
And when I was able, I had to define encode them as MacBengali.
But as I said: “in my experience”; which means, a very limited experience.