Convert Table to Image?
I have around a dozen tables that I would like to convert to images in Pages.
How do I do this? It's apparently not as simple as right-clicking and 'convert to image' 😝
Thanks, guys.
Pages-OTHER, Mac OS X (10.6.7)
I have around a dozen tables that I would like to convert to images in Pages.
How do I do this? It's apparently not as simple as right-clicking and 'convert to image' 😝
Thanks, guys.
Pages-OTHER, Mac OS X (10.6.7)
Here are a couple of methods:
1. Take a screen shot. Press shift-command-4, then drag the crosshair cursor to select the portion of the screen you want to capture. When you release the mouse button, the selected area will be captured and saved to your desktop as a .png file (Picture 1.png).
2. Select the table and Copy. Launch Preview and go File > New from Clipboard. Save the image in whichever format you desire.
Insert or paste the image file into Pages.
Regards,
Barry
Mark,
Just bear in mind that this entire post refers to Pages '09 and Numbers '09 only — because these applications were written to copy PDF data to the clipboard. Pages v5/Numbers v3 and later Pages v6/Numbers v4 paste 72 dpi png to the clipboard — which is no better than a screen capture.
Warning Mark
Apple has screwed up the copy and paste in all the recent iWork Apps and recent macOSes.
They are all converted to 72dpi bitmaps in the clipboard and lose their pdf vector.
The iWork '09 Apps are still good.
Peter
Does the "New from Clipboard" method work for you? All I get is a white image.
However, if I copy, paste in Numbers, copy, then "New from Clipboard", I get a valid image. Then I can drag it from the Preview sidebar into Pages as a PDF image or save it as a jpg and then put it into Pages.
Badunit wrote:
Does the "New from Clipboard" method work for you? All I get is a white image.
Thanks for asking. I hadn't checked this with a Pages Table until reading your message.
Strike suggestion 2. It doesn't work. 😟
Regards,
Barry
It was the first thing I tried. I expected it to work like it does in Numbers.
Badunit wrote:
It was the first thing I tried. I expected it to work like it does in Numbers.
And therin lies a possible solution!
Select the table in Pages.
Copy.
Open a Numbers document.
Click in the Sheets list, then Paste.
Select the Table in Numbers.
Copy.
Open Preview and press command-N (or go File > New from Clipboard.
Save the result in the format of your choice.
Here's the result, using PNG as the format (Click to expand):
The original is a table from the Pages "business report" template, copied with the placeholder text still in it.
Regards,
Barry
It doesn't work in Pages '09 but it does work in Pages '08!!!! I will report it but it is alway useful if more people report the same thing
Badunit wrote:
It was the first thing I tried. I expected it to work like it does in Numbers.
Badunit,
Of course it should work as it does in Numbers. I'll volunteer to also report the bug.
There is a method that doesn't require Numbers and works almost as smoothly as Copy, Open Preview, Command-N. That is:
In Pages, Command-P, select just the current Page to Print, PDF: Open in Preview, Rectangular Selection of Table, Command-C, Command-N.
Jerry
Preview appears to be only understanding the bounding box of the table.
Pages is copying it correctly, as you can paste it again in Pages.
I have also reported it as a bug.
Peter
Wow, great response. I'd like to thank you all for taking the time to help me.
Jerrold's reply was the one I used. So easy and yet I had no idea about it.
Thanks again.
It is indeed annoying. It would be very nice if iWork had a "paste as" function, like office for mac. My workaround is the following one:
Open peview
Under file, select screenshot, from selection
Drag the crosshair, and the table you want as image is immediately available in preview.
Cheers,
Nico
Here is a script doing the trick in a single call.
--{code}
--[SCRIPT table-from-Pages-to-PDF]
(*
Enregistrer le script en tant que Script : table-from-Pages-to-PDF.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Utilisateurs:<votreCompte>:Bibliothèque:Scripts:Applications :Pages:
Il vous faudra peut-être créer le dossier Pages et peut-être même le dossier Applications.
Sélectionner une table dans Pages
Aller au menu Scripts , choisir Pages puis choisir “table-from-Pages-to-PDF”
Le script copie la table, la colle dans un document Numbers temporaire.
Il copie la table devenue objet Numbers puis demande à Aperçu de créer un nouveau document depuis le presse-papiers
Bien entendu il est possible d'utiliser FastScripts pour associer un raccourci clavier au script.
--=====
L’aide du Finder explique:
L’Utilitaire AppleScript permet d’activer le Menu des scripts :
Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case “Afficher le menu des scripts dans la barre de menus”.
Sous 10.6.x,
aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
--=====
Save the script as a Script: table-from-Pages-to-PDF.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Pages:
Maybe you would have to create the folder Pages and even the folder Applications by yourself.
Select a Pages table.
Go to the Scripts Menu, choose Numbers, then choose “table-from-Pages-to-PDF”
The script copy the table, paste it in a temporary Numbers document.
Then it copy the table which is now a Numbers object and close the temporary document.
At last, it ask Preview to create a new document from the clipboard.
--=====
The Finder’s Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the “Show Script Menu in menu bar” checkbox.
Under 10.6.x,
go to the General panel of AppleScript Editor’s Preferences dialog box
and check the “Show Script menu in menu bar” option.
--=====
Yvan KOENIG (VALLAURIS, France)
2012/02/26
*)
--=====
on run
my activateGUIscripting()
tell application "Pages"
--
end tell
(*
Copy the Pages table *)
my raccourci("Pages", "c", "c")
set myNewDoc to my makeAnIworkDoc("Numbers")
tell application "Numbers" to tell document myNewDoc to tell sheet 1
deletetable 1
end tell
(*
Paste it in a temporary Numbers document *)
my raccourci("Numbers", "v", "c")
delay 0.1
(*
Copy the table which is now a Numbers object *)
my raccourci("Numbers", "c", "c")
(*
Close the temporary document *)
tell application "Numbers" to close document myNewDoc without saving
(*
Create a new Preview document from the clipboard *)
my raccourci("Preview", "n", "c")
end run
--=====
(*
Creates a new iWork document from the Blank template and returns its name.
example:
set myNewDoc to my makeAnIworkDoc(theApp)
*)
on makeAnIworkDoc(the_App)
local maybe, path_to_the_App, nb_doc
if the_App is "Pages" then
tell application "Pages"
set nb_doc to count of documents
makenewdocumentwith properties {template name:item 1 of templates}
end tell
else if the_App is "Numbers" then
tell application "System Events" to the_App is in title of every application process
if not result then activateapplicationtheApp
tell application "System Events"
set path_to_the_App to get application file of application processthe_App
end tell
tell application "Numbers"
set nb_doc to count of documents
open ((path_to_the_App as text) & "Contents:Resources:Templates:Blank.nmbtemplate:")
end tell
else
if my parleAnglais(theApp) then
error "The application “" & the_App & "“ is not accepted !"
else
error "l’application « " & the_App & " » n’est pas gérée !"
end if
end if
tell applicationthe_App
repeat until (count of documents) > nb_doc
delay 0.1
end repeat
name of document 1
end tell -- the_App
return result
end makeAnIworkDoc
--=====
on activateGUIscripting()
(* to be sure than GUI scripting will be active *)
tell application "System Events"
if not (UI elements enabled) then set (UI elements enabled) to true
end tell
end activateGUIscripting
--=====
(*
==== Uses GUIscripting ====
*)
(*
This handler may be used to 'type' text, invisible characters if the third parameter is an empty string.
It may be used to 'type' keyboard raccourcis if the third parameter describe the required modifier keys.
I changed its name « shortcut » to « raccourci » to get rid of a name conflict in Smile.
*)
on raccourci(a, t, d)
local k
activateapplicationa
tell application "System Events" to tell application process a
set frontmost to true
try
t * 1
if d is "" then
key codet
else if d is "c" then
key codetusing {command down}
else if d is "a" then
key codetusing {option down}
else if d is "k" then
key codetusing {control down}
else if d is "s" then
key codetusing {shift down}
else if d is in {"ac", "ca"} then
key codetusing {command down, option down}
else if d is in {"as", "sa"} then
key codetusing {shift down, option down}
else if d is in {"sc", "cs"} then
key codetusing {command down, shift down}
else if d is in {"kc", "ck"} then
key codetusing {command down, control down}
else if d is in {"ks", "sk"} then
key codetusing {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
key codetusing {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
key codetusing {command down, shift down, option down}
end if
on error
repeat with k in t
if d is "" then
keystroke (k as text)
else if d is "c" then
keystroke (k as text) using {command down}
else if d is "a" then
keystrokekusing {option down}
else if d is "k" then
keystroke (k as text) using {control down}
else if d is "s" then
keystrokekusing {shift down}
else if d is in {"ac", "ca"} then
keystroke (k as text) using {command down, option down}
else if d is in {"as", "sa"} then
keystroke (k as text) using {shift down, option down}
else if d is in {"sc", "cs"} then
keystroke (k as text) using {command down, shift down}
else if d is in {"kc", "ck"} then
keystroke (k as text) using {command down, control down}
else if d is in {"ks", "sk"} then
keystroke (k as text) using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
keystroke (k as text) using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
keystroke (k as text) using {command down, shift down, option down}
end if
end repeat
end try
end tell
end raccourci
--=====
--[/SCRIPT]
--{code}
Before writing it, I made several tests.
set the clipboard to the clipboard as «class PDF »
With it, Preview create a white rectangle
set the clipboard to the clipoard as «class 8BPS»
which is the PhotoShop format
With it, Preview create a gray rectangle
set the clipboard to the clipoard as «class RTF »
Preview can't treat this contents
set the clipboard to the clipoard as «class rtfd»
Preview can't treat this contents
set the clipboard to the clipoard as «class TPIC»
Preview create a white rectangle.
Each time, the result is the same if we select the table (with its 8 handles)
or if we select every cells.
Using a temporary Numbers document was the easiest workflow for a script.
Yvan KOENIG (VALLAURIS, France) dimanche 26 février 2012
iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3
My Box account is : http://www.box.com/s/00qnssoyeq2xvc22ra4k
Thanks - I like option two because it gives more control over image quality - cheers Mark
Convert Table to Image?