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
Hello ABAP Experts Since the Issue is related with Related Report output. Thought ABAP General Forum would be right place to post. If not Suggest an appropriate forum for the same. I shall post them in Correct Forum. Currently the report display Curr [More]
I have a problem when trying to setup "SSRS ad on" on SharePoint 2013 server : - i have azure farm for SharePoint - Server A is SQL2012 SP1 and reporting services is installed and running on it - Server B is SharePoint 2013 with Microsoft® SQL S [More]
Have just transferred FCE 4.0.1 to Lion. How can I customize keyboard, particularly the F-9 thru F-12 insert edit keys?Got it figured out. Question answered.Read other 2 answers [More]
Hi there, my wife will travel in August for three weeks to Japan. So far I've collected these information: GSM ist not available, UMTS in Tokyo - but NTT DoCoMo don't support UMTS. What other provider (Softbank ?) support UMTS? Her iPhone 4 is not si [More]
This is such a basic thing .I can't believe I can't find or figure out how to do this . I'd like to be able to set the margins to 1/8th inch all around . It doesn't have to be pretty . I just want to be able to make the font as large as possible and [More]
I noticed that the three point multi-touch function, for back and forward browsing, is missing in the new version iTunes.2. Why can I not remove the "Price" column from my song list view?  It is not available under any custom options. The Price [More]
Hai Experts,                     How to create a simple radio button through UI , how to assign  values for the attributes selected key and key to select..explain in detail. Thanks in advance, Regards,   R.Jude Silvester.Hi Jude, Basically you have 3 [More]
We are installing WL on Solaris 2.7. This is a fresh install on a new machine that will be used as a development staging area. We have an opportunity to either install Solaris 2.7 Workstation or Server (we don't want to install on Solaris 8). Does WL [More]
i paused a download and switched off my system & when i resumed the download after 1 or 2 days it says c:\Documents and settings\ ....etc could not save the file and i had to restart the download from the beginning. So couldn't i resume the download [More]
Hi all, Have had my macbook since christmas now and everything has been great, until about 3 days ago when activity monitor just stopped working, I open it, then it appears on the dock and disappears a second later! No window pops up, just the icon o [More]