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
Hi All,        I want to know what is the use of a narrowing cast and a widening cast in ABAP objects. Can someone please give an example ? Regards, AshishHi, Check out this link, This will guide you on ABAP Objects http://www.sap-press.de/katalog/bu [More]
Hi Guys I have to upgrade from 10.2.0.3.0 to 10.2.0.4.0 on windows 2003 server. I am confused about the Java Virtual Machine. The JVM is already configured (check below). Do i have to then install the Oracle Database 10g Products installation type fr [More]
Hello, I am working on a project and recently discovered the "toggle button" advanced action that lilibiri posted (Love the toggle button!!). Initially i had used the rollover funktion but found out via html5 tracker, that rollover is not suppor [More]
Altho I do supposedly save to iCloud, I cannot find my Ipad "Notes" these when I log on to my iCloud account from my laptop. Any ideas? Thanks, James Old iPad version 5.1.1 - supposedly this is fine iCloud is indeed enabled for "notes" [More]
I have a 23" HD display. I also have a HD cable box from the cable company that has both a firewire and DVI port on the back. Is there any way I can use either of those ports to display HD cable tv on my display? I'm wondering about making it happen [More]
I have reset my account & password numerous times, yet everytime I try to update the apps installed on my device it says Apple ID has been disabled.See: Apple ID: "This Apple ID has been disabled for security reasons" alert appearsRead other [More]
I've designed a form in Indesign CS6 (trial version) and added the submit button with a mailto email address as in the tutorials etc. I have opened it in Adobe Acrobate 10 and extended the forms functionality to Adobe Reader. When opened online and t [More]
Is there a way to allow specific sites to use 3rd party cookies or is it all or nothing? Safari 7.0 (9537.71)All or nothing for Safari but Firefox cookies preferences allow enabling or disabling cookies for individual sites > Block websites from stor [More]
I wonder if i can get logic pro x in my MacBook Pro version 10.7.5 and if it's steel gone be fast? Tanks!!Welcome to Apple Support Communities Logic Pro X requires OS X 10.8.4 or newer, so if you want to use it, you will have to upgrade to Mountain L [More]
Hello! I just ran software update and iChat is now 4.0.5. However, the buddy list doesn't show and it does not log me into AIM. So, I opened Preferences and if I click on any tab except for Accounts, the program keeps running. But, if I click on acco [More]