Friday, January 09, 2009

How do I see what my file contains?

If you want to see the elements included in your Pages '09 file, you can simply unzip it, using the command unzip in a terminal window.

To avoid any accidents with large numbers of files spread in the current directory you can follow these steps.
  1. Create a new folder "test".
  2. Drag your Pages file to the folder "test".
  3. Open the Terminal (Applications > Utilities > Terminal).
  4. Type cd in the Terminal and press the spacebar.
  5. Drag the folder "test" to the terminal.
  6. Hit enter. (This will change the "current directory" of the Terminal to your folder.)
  7. Type unzip in the Terminal and press the spacebar.
  8. Drag the Pages file to the Terminal.
  9. Hit enter.
  10. Open the folder "test" in the Finder
The folder "test" now contains all the images and media of your Pages file. The actual text is in a file called index.xml.gz. You can now easily see which images you have, how big they are and so on.

If you want more information about the unzip command, type man unzip in a Terminal window, and press enter. Move up or down in the man page using the arrow keys. Type q to leave the man page.

Before Pages '09, all Pages files were packages. To see the content you would simply right click on the file and choose the option "Show package content" from the pop-up menu.

Even in Pages '09, you can use packages instead of single files, if you go to the menu Pages > Preferences > Save new documents as packages.

4 comments:

ZRV said...

Hello. Do you have any advice if the following should appear during unzipping?

inflating: index.xml
error: invalid compressed data to inflate


This is a very important document to me that without warning will no longer open. Any advice would be very appreciated.

Zoran

Magnus Lewan said...

That does not look right. I'm afraid I do not know how to fix it. Unless you already did so, you may try posting your question at Apple's forums.

Unknown said...

You can replace .pages with .zip and then double-click the file to unzip.

Marcel said...

Is there a way to this with fonts I used for a document?