Sitemap

Amicuk Programming Answers

How to convert Numbers files to pdf

-0001-11-30   Views:0

Advertisement

Hi.  I have a large number of Numbers documents I want to give to my book-keeper.  She doesn't use a Mac, so she can't use Numbers files.  I want to convert them to PDF so she can view them.  I've been converting them manually.  This is what I do: 1)

Hi.  I have a large number of Numbers documents I want to give to my book-keeper.  She doesn't use a Mac, so she can't use Numbers files.  I want to convert them to PDF so she can view them. 
I've been converting them manually.  This is what I do:
1)  Open the Numbers file.
2)  Choose Print.
3)  Select "All Sheets".  This is important because I have 5 sheets in each document.
4)  Choose "Save as PDF".
5)  The default name is fine, so press OK.
6)  Close the Numbers file.
I have hundreds of these files.  Is there a way I can automate the process of converting them?
Thanks for the help!

The replay answer
Advertisement
Hello
You may try the following script. It will ask you to choose folder where Numbers files reside and then export every Numbers file in the chosen folder as PDF. Export destination folder will be the last folder you used for export. So you'd better export one file in advance and select the export destination folder you want to use. It will replace existing pdf file in destination folder.
Menu text are assumed in English and hard coded in script. For languages other than English, please edit the following three properties in export_as_pdf() handler:
property export_menu : "Export…"
property image_quality : "Good" -- Good | Better | Best
property layout : "Sheet View" -- Sheet View | Page View
The first one is menu item name of File > Export… (note … is U+2026 HORIZONTAL ELLIPSIS, which can be inputted by option ; in English keyboard for instance) and the rest are for options in Export sheet.
Tested with Numbers 2.0.5 under OSX 10.6.5.
Hope this may help,
H
_main()
on _main()
    script o
        property ff : {}
        property xx : {}
        property yy : {}
        set f to choose folder with prompt "Choose folder of Numbers files"
        tell application "Finder"
            set ff to (files of f whose name ends with ".numbers") as alias list
        end tell
        tell application "Numbers" to launch
        repeat with f in my ff
            tell application "Numbers"
                tell (open f)
                    if my export_as_pdf("", {_replace:true}) then
                        set end of my xx to f
                    else
                        set end of my yy to f
                    end if
                    close
                end tell
            end tell
        end repeat
        tell application "Numbers"
            display dialog "Exported " & (count my xx) & " of " & (count my ff) & " files." giving up after 20
        end tell
    end script
    tell o to run
end _main
on export_as_pdf(pdfname, {_replace:_replace})
        string pdfname : output pdf file name (pdfname = "" denotes the current name whose extension is replaced with "pdf")
        boolean _replace : true to replace existing pdfname, false otherwise
        return boolean : true if operation is not canceled, false otherwise (in case _replace = false and pdfname already exists)
    script o
        property export_menu : "Export…"
        property image_quality : "Good" -- Good | Better | Best
        property layout : "Sheet View" -- Sheet View | Page View
        property _canceled : false
        tell application "Numbers"
            activate
            if pdfname ≠ "" then set the clipboard to pdfname
        end tell
        tell application "System Events"
            tell process "Numbers"
                tell menu bar 1's menu bar item 3 -- File
                    tell menu 1's menu item export_menu -- Export…
                        click
                    end tell
                end tell
                tell (window 1 whose subrole = "AXStandardWindow")
                    tell sheet 1
                        tell radio group 1
                            tell radio button 1 -- PDF
                                if value ≠ 1 then click
                            end tell
                        end tell
                        tell pop up button 2 -- Image Quality
                            if value ≠ image_quality then
                                click
                                tell menu 1's menu item image_quality
                                    click
                                end tell
                            end if
                        end tell
                        tell pop up button 1 -- Layout
                            if value ≠ layout then
                                click
                                tell menu 1's menu item layout
                                    click
                                end tell
                            end if
                        end tell
                        tell button 1 -- Next…
                            click
                        end tell
                    end tell
                end tell
                --keystroke "d" using {command down} -- desktop
                if pdfname ≠ "" then keystroke "av" using {command down} -- select all and paste in file name
                keystroke return
                tell (window 1 whose subrole = "AXStandardWindow")
                    tell sheet 1 -- save sheet
                        repeat while exists
                            delay 0.1
                            tell sheet 1 -- alert sheet (already exists)
                                if exists then
                                    if _replace then
                                        click button 1 -- Replace
                                    else
                                        click button 2 -- Cancel
                                        set _canceled to true
                                    end if
                                end if
                            end tell
                            if _canceled then click button 3 -- Cancel
                        end repeat
                    end tell
                end tell
            end tell
        end tell
        return not _canceled
    end script
    tell o to run
end export_as_pdf

Go to See the other 7 answers

How to convert Numbers files to pdf

Category:DefaultRelease time:-0001-11-30Views:130

Hi.  I have a large number of Numbers documents I want to give to my book-keeper.  She doesn't use a Mac, so she can't use Numbers files.  I want to convert them to PDF so she can view them.  I've been converting them manually.  This is what I do: 1)[More]

Converting many numbers files to PDFs?

Category:DefaultRelease time:2015-10-11Views:130

Hi everyone! I would like to convert many Numbers files to PDF documents. Every Numbers document should be a new PDF with the same name! I even tried to write a workflow file with Automator, but I dont get the "create a PDF"-part running. Furthe[More]

Error: EXOpenExport() while converting xlsb file to PDF

Category:DefaultRelease time:2015-10-11Views:130

I am getting this error while converting .XLSB file to PDF using IBR :Step PDFExport forced conversion failure by conversion engine because of error: EXOpenExport() failed: no filter available for this file type (0x0004). Can anyone tell me how to re[More]

When I converted a file from PDF to WORD.DOC it opened as Read Only and I'm unable to alter any of the text.  How can I solve this problem?

Category:DefaultRelease time:2015-10-11Views:130

When I tried to convert a file from PDF to WORD.DOC it opened as Read Only and I'm unable to alter any of the text.  How do I solve this problem?  I don't know how to change it from Read Only.Dear Sara Thank you very much for sending the converted fi[More]

Not able to convert word file to PDF using Adobe Acrobat 9 Standard

Category:DefaultRelease time:2015-10-11Views:130

Hi, I am not able to convert word file to PDF using Adobe Acrobat 9 Standard. When I try to convert, it starts the process and in between I am getting this prompt, as shown in figure below and the conversion process stops. The PDF is not created. Not[More]

Acrobat XI Pro successfully installed, but it failed in converting word files into PDF, why?

Category:DefaultRelease time:2015-10-11Views:130

I just installed Adobe XI Pro through the download assistant, it looks the installation went well, but when I tried to convert word files into PDF (tried many times), it failed. Anyone has the same problems, any solutions?Please reply with more infor[More]

How do I convert a file to PDF without subscribing?

Category:DefaultRelease time:2015-10-11Views:130

I just downloaded Adobe Reader X, I'm running Windows 7, When I try to convert a file to PDF I'm required to subscribe? I thought this was free? Any ideas?Adobe Reader is free - and it reads PDF files; it doesn't create them. Adobe CreatePDF and Expo[More]

I purchased the Adobe PDF Pack but it won't allow me to convert any files to pdf or combine multiple files to into 1 pdf form. It keeps saying "Error occurred while trying to access the file". WHY

Category:DefaultRelease time:2015-10-11Views:130

I purchased the Adobe PDF Pack for $7.50/month (or $89.99/yr) but it won't allow me to convert any files to pdf or combine multiple files into 1 pdf form. It keeps saying "An error occurred while trying to access the service". WHY is this happen[More]

How to convert a file from pdf to txt in java

Category:DefaultRelease time:2015-10-11Views:130

hi, in my project ,I want to convert a file from pdf to txt using java api. If anyone have any idea about it plz help me.Google has several ideas. :)Read other 2 answers[More]

When i convert any file to pdf, date is automatically added in the header in pdf file. How to change

Category:DefaultRelease time:2015-10-11Views:130

When i convert any file to pdf, date is automatically added in the header in pdf file. How to change that?*heres a screenshot heres a screenshot of how i convert themRead other 7 answers[More]

Converting XPS file to PDF

Category:DefaultRelease time:2015-10-11Views:130

Hello,  I need to write program which automatically convert all xps files from foler into pdfs. One of my ideas is using pattern -> Opening XPS file, then printing it with "Adobe PDF" printer.  Can you give me any help how I can write a progr[More]

Hot
LIst of issues after uodate 1-Email comes back after I deleted them. 2-Apps crash or do not respond 3-Screen rotation not working properly 4-Battery drain quick 5- Using iphone get frozen 6-wifi drop connection and bluetooth 7- also gps for years sin [More]
Up until now I have been able to insert replacement images into my website. I can no longer do so. A window with 'File not found' sometimes appears. Any clues?Thank you -graphiti. I seem to have fixed the problem by upgrading to Contribute 6.5, but w [More]
I used to store films from my Pc to an iomega HD multimedia, now I have this MacBook Pro and I can't transfer films to the same Hard Drive. Does it have a specific formate just to be used in a PC ?Select the files, click & drag to the HD icon, and re [More]
Hi, How do I install open office? Running pacman -S openoffice I get above response. Thanks Solved: found the following Wiki page: http://wiki.archlinux.org/index.php/OpenOffice Last edited by mibadt (2009-11-20 01:43:14)B wrote:Well because of licen [More]
Hello, I have some bad performances in a web interface. I could correct some of them help to aggregates, but I am facing a bizarre situation. I have one variable for 0EMPLOYEE. I fetch the characteristic values help to an exit function, and this work [More]
Hi, I would like to redefine the keyboard shortcuts for the Dashboard, Dock, and Exposé functions, i.e. I don't want these functions to be bound to the f8-f11 keys. I can redefine the shortcuts manually using the Keyboard pane of the System Preferenc [More]
I have a AQ adapter which consists of the following payload : CREATE OR REPLACE TYPE "XML_CLOB_TYPE" AS OBJECT (XML CLOB I've added an AQ adapter in ESB which enqueues messages to this specific queue. I've got a certain payload ( in XML format ) [More]
Hi, I'm following: http://azure.microsoft.com/en-us/documentation/articles/hdinsight-storm-sensor-data-analysis/ I can run this example locally (up to and including the section "start the topology") with a local topology in Java. I complete the [More]
I am using Adobe LiveCycle Desginer ES.  I am updating forms currently created in Livecycle 6 and 7.  I am noticing the text fields are lower on the preview mode than where I have placed them on the design mode. In design mode, they are perfectly in [More]
The user upload images to my web site. He can enter 3 images; but sometimes he enters only 2. When an image is absent, the browser try to find it and display a small red cross at the left corner. My concern was to avoid the display of this small red [More]