11

I want to extract all of the images out of a large pages document. I found an article about it from 2006 ( see http://hints.macworld.com/article.php?story=20060324033125571 ) which states you can open the pages file as a package and extract the images. Right clicking shows no 'open package' item and using pkgutil --expand mydoc.pages . errors with "Could not open package for expansion" I'm guessing the pages file format is now somewhat different.

So how can I extract all of the images from my pages document in one go? (there are around 100 pictures, so too many to do by hand unless I absolutely have to)

1
  • Definitely AppleScript is the way to go here. I don't have Pages so can't tell you how, hence not adding an answer
    – Stu Wilson
    Commented Jan 20, 2012 at 16:31

7 Answers 7

9

In later iWork edition Apple made changes to the formats so this is the cause that you can not follow the procedure described in the article that you are referring.

The best way to go around this annoyance would be:

  • Open the pages document with your current pages (I assume is the latest Pages),
  • Save us some other name but before you do it extend the save us menu using the up/down arrow where you are presented with more choices,
  • Select the radio button "Save copy as:" and choose iWork'08 and then save it.
  • Go find your new saved document and you are now presented with the "Show package content" additional menu item (on your right click).
  • Extract the images (copy them somewhere else).
1
  • I prefer this method to the procedure I outline unless one already has Pacifist installed in which case my trick let's you skip the trip to Pages and the extra file.
    – jaberg
    Commented Mar 8, 2012 at 15:39
18

The Fastest way to to do this is to change the file extension from name.pages to name.zip (actually manually click on the file name and change the extension to .zip)

Now just unzip your document and you will get a folder with all the images in it. Same works for ePubs.

4
  • Sounds hacky but it's so deliciously easy...I tried this with a .docx on a Mac and it worked just fine.
    – intcreator
    Commented Oct 6, 2016 at 6:17
  • Thank you. Thank you. Thank you. I'm a little annoyed at Pages (how hard is it to save an image from a document), but you saved the day!
    – Maximus
    Commented Jun 9, 2017 at 14:40
  • Works like a charm!
    – ymasood
    Commented Jul 18, 2017 at 11:37
  • Also works for other iWork and MS Office types like excel, keynote, and powerpoint! Commented Jul 22, 2017 at 20:39
2

Open the Pages document using Pacifist. (Other archive utilities might work also, but Pacifist worked for me.)

I did this by right (CTL)-clicking on the Pages document icon, then choosing Open with… Pacifist from the contextual menu.

This will produce a window listing the contents of the Pages "package" file. Select the graphics files you need, and "Extract To…" a convenient location

I haven't explored it, but there might be a way to automate this procedure using AppleScript and/or Automator if its something you do often.

6
  • Unfortunately, this doesn’t seem to work with the most recent version of the Pages file format. Commented Mar 8, 2012 at 11:21
  • This technique is specifically aimed at the newer pages format which is essentially an archive file format. As of 15 seconds ago this technique worked perfectly with a new document created using Pages '09 version 4.1(923). Can you point me to a newer version of Pages so I can test it?
    – jaberg
    Commented Mar 8, 2012 at 15:11
  • Huh, that’s odd — maybe there’s something weird with the file I’ve got. I’ll check with my friend to see what version he’s using, and see if I can get another couple of test files. Commented Mar 8, 2012 at 15:20
  • Happy to test here using non-sensitive files. You can generally ping me from the chat room.
    – jaberg
    Commented Mar 8, 2012 at 15:28
  • That’s grand, cheers, I’ll let you know once I’ve checked with my friend. He did send me the file as an e-mail attachment, so maybe it got a bit borked in transit — I don’t have Pages here, so I can’t currently check if Pages opens it. I’ll investigate and follow up. Commented Mar 8, 2012 at 16:31
2

I just used Terminal.

# mkdir /someDirectory
# cd file.pages
# find . -name "*.png" -or -name "*.jpg" -exec cp {} /someDirectory \;

You can mess with the file extensions in that last line to copy different file types.

1

FYI - If using the newest-as-of-2014 Pages application (citing version 5.5.1 here), you cannot access the package contents via the finder, and you can only export to Pages '09.

However, if you go to File -> Advanced -> Change File Type and select "Package" versus "Single File," you'll be able to open the file's contents in the finder and be good to go. (This saved me being able to do something constructive with my wife's birthday card.)

0

it seems that on newer Pages the "Save as" no longer exist and it let you save only as Pages'09 .... I got around by exporting it to PDF at best resolution and then dragging out the images to my desktop. But if you do this, you have to rename every picture you drag out before dragging another one or you might end up by replacing the last dragged image.

-3
  1. Open the Pages application
  2. Open the document which contains the images you want extracted
  3. Select the image
  4. Copy the image by either clicking 'Edit' then 'Copy' from the menu that pops up or clicking command and C keys together (on your keyboard)
  5. Open the 'Preview' Application
  6. Click 'File' From the menu that pops up click 'New from Clipboard' (should be first option). Preview will create a new document of file type png with the image that you want.
  7. Save the document to your desire location. If you wish to

Extract Images from Pages using Preview

3
  • Welcome to Ask Different! We're trying to find the best answers and those answers will provide supporting info as to why they're the best. Answers should be self-contained so explain why you think the answer you provided will solve the problem or is better than others out there. Providing links as supporting information is good but answers shouldn't be just a link. See How to Answer on how to provide a quality answer. - From Review
    – fsb
    Commented May 9, 2018 at 17:52
  • Have you actually tried that yourself? The copied image is of abysmal quality, more like a thumbnail. Commented Apr 22, 2019 at 14:04
  • Yes I did try it and the images were very usable. Not sure if Apple has made changes that affect this since I wrote this method. I will take a look at it again. It is also possible that your result is affected by the quality of the image stored in the PDF in the first place, which would be a limitation of using this method. Commented Apr 24, 2019 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .