Having trouble using applescript to save pdf as excel spreadsheet

I have been trying to use applescript to create an automator action to convert some downloaded PDF's to .xlsx format.  After reviewing a good bit of the SDK documentation, I came up with the following scripting:
tell application "Adobe Acrobat Pro"
                              open theFile
                              save front document to file theNewFile using conversion "com.adobe.acrobat.xlsx"
  close front document
end tell
This script works fine when I use the "com.adobe.acrobat.plain-text" conversion or the png or jpeg conversion. However, I cannot get it to work with "com.adobe.acrobat.xlsx" or "com.adobe.acrobat.spreadsheet".  Note that although I didn't copy the code here that sets theNewFile variable, I have been changing it to the appropriate file extension when changing conversion strings.
When I execute the script using one of the problem conversion strings, Acrobat opens the file successfully, but it just sits there, as if it does not understand the save command at all.
I guess I should mention that the whole goal here is to actually convert the PDF's to CSV eventually.  The next step was going to be to open the file in Excel and save as CSV.  If anyone knows a *free* way to go straight from PDF to CSV using Applescript/Automator without having to go through all these other programs, I would be very appreciative for the suggestion.  This conversion is just a small part of a very lengthy workflow but it is causing me the most trouble.

Hello Jonathan,
Ok i have only one final question.
Do you know how to work in photoshop, don't you? Ok i think yes.
Well i have 2 ways to do that, i did one action from photoshop that will get the image inside folder and will convert this image in pdf. Abouve the line of script
that you have to attach to folder action and the action for Photoshop.
About the action for Photoshop give me your email address and I send you, or do it your self. You have to do this: open one image in JPG, go to action, go new set, put your name of set, put the name of action if you like you can change the name, go print with preview, print and set save as PDF close your file and stop the action.
Now that you have to do is put all your files inside your folder and leave the Photoshop do it for you, ok?
Good Luck
Hack
property speak_alert : false -- if true, the script will speak the alert. If false, the script will display an alert dialog
property dialog_timeout : 30 -- set the amount of time before dialogs auto-answer.
property copychecksindicator : false
property itemcheck_delaytime : 2
property foldercheck_delaytime : 3
property speciallabelindex : 7
on adding folder items to this_folder after receiving added_items
if copychecksindicator is true then
set the added_items to my checkaddeditems(the added_items)
if the added_items is {} then return "no vaild items"
end if
tell application "Finder"
activate
set this_folder to choose folder with prompt "pdf"
set these_files to every file of folder this_folder
end tell
tell application "Finder"
repeat with i from 1 to number of items in these_files
set this_path to (item i of these_files) as string
tell application "Adobe Photoshop CS2"
launch
open file (this_path as string)
set this_files to current document
do action "Jpg" from "Jpg para Pdf"
end tell
end repeat
end tell
end adding folder items to

Similar Messages

  • I am having trouble establishing file association between .PDF files and Adobe Reader.

    I am having trouble establishing file association between .PDF files and Adobe Reader.  When I click on a .PDF file, Adobe Reader does not open the file.  I installed Adobe Reader on a Lenovo G480 laptop using Windows 8.  When I attempted to open a file called I believe G480_user_guide.PDF, a file called something like Nitro_PDF opened.  When I right clicked G480_user_guide.PDF and chose Open With, I found that Nitro_PDF was the default program for opening the file.  I tried to change to another program but found that Adobe Reader was not listed.  I chose the option for searching the computer for a file to open.  I found the folder Adobe in Program Files x64 but I was not able to find an executable.  Where is the Adobe Reader executable or what other method can I use for establishing file association between .PDF files and Adobe Reader.

    Yes, I have now learned how to make a search with the Google search engine.  I am gradually learning how to use my new Lenovo laptop computer with Windows 8.  I learned yesterday that I can make a search with the Google search engine if I enter the search query in the address bar of the Google Chrome browser.  I think it was the Bing search engine that gave me the sites advertising Adobe Reader download but actually provided the download of a reader other than Adobe.
    In my opinion, Windows 8 is significantly different from Windows 7 and that it has hazards and pitfalls.
    I thank all of those who have replied to the initial inquiry.

  • I'm having trouble using Adobe Reader

    I'm having trouble using or uninstalling Adobe Reader, i get a message when the programme has been anitiated which says Adobe Reader has encountered a problem and needs to close, i went on to Adobe's website and it said try uninstalling Adobe Reader and then re-install it as this sometimes works, i tried un-installing it from the Add or Remove programme but that didn't work either as i got another message telling me that the patch package could not be verified and to make sure i have permission.

    Dear Mylenium.
    Sorry i don't quite understand your reply, What do you need to know?

  • Im having trouble using Emoji on some apps since i downloaded ios5... Anyone else experiencing this?

    Im having trouble using Emoji on some apps since i downloaded ios5... Anyone else experiencing this? Ive tried every thing deleting emoji and apps and re-instaling to no sucsess?? Any help would be great thanks!

    YES! I am having a lot of AppStore problems since iOS 6. My 2 main issues are:
    1. AppStore crashes constantly or will just sit & spin then does nothing at all.
    2. If I search for a specific App, making sure my spelling is correct, AppStore will NOT bring the app up. Instead, it will bring up unrelated apps.
    Podcasts app does the same thing, as well as jumbling up dates. Very impossible to find the correct episode.
    APPLE, please tell me you are reading this and that a fix is quickly under way!!

  • Im having trouble using bbciplayer on my ipad it says i need to switch to wifi but im already connected can any one help?

    im having trouble using bbciplayer on my ipad it says i need to switch to wifi but im already connected can any one help? I ve uninstalled/ reinstalled  switched it on and off what next?

    Did you try downloading the movie from iTunes on your iPad?  I know it takes longer but I'd try that. 
    Also try to reset all settings. 
    Settings > General > Reset. Reset all settings. 

  • I just downloaded Mainstage, I'm having trouble using it, because it won't open, can someone help me out?

    I have the latest Mac Os update ... I downloaded Mainstage, it won't open... Why is that???  I've deleted it, reinstalled it, but I keep having trouble using it...

    Yu have to run the library upgrader - it is in your applications folder in the utilities folder - double click on it to exceute it - then launch iPhoto after running the library upgrader
    LN

  • I'm having trouble using my redemption code to access Lightroom?

    Can any one help I am having trouble using my redemption code to access the download of lightroom

    i am having the saame trouble with my audio book.  I can get music but no longer my book. and it makes me mad. help me too.

  • I'm having trouble using my track pad. The arrow moves but I can't click on anything.

    I'm having trouble using my track pad. The arrow moves but I can't click on anything.

    Oh thank you for posting on how to enter safe browsing! I had tried to disable add-ons, but couldn't make anything click to do so. So frustrating!
    Anyway, after putting on the safe browsing, it worked *immediately*, so clearly the add-ons were the issue! I deleted a bunch I don't use anyway, and it's been working fine for hours.
    Thank you!!

  • I'm having trouble using the iTunes and Apps store because i can't register my Nigerian mastercard. What should i do. i'm trying to register it in the Nigerian iTunes store.

    I'm having trouble using the iTunes and Apps store because i can't register my Nigerian mastercard. What should i do. i'm trying to register it in the Nigerian iTunes store.

    Is this a new Apple iD? If it is, and you have already set it up, then you have two options:
    1.     Temporarily put a Credit Card or Gift Card on the account to download the free app. If you put a credit card, then once you have downloaded the app, you should be able to go into your Account preferences and change the payment option to = None.
    2.     You can download the fee App, and then set up a new Apple ID.
    Cheers,
    GB

  • I'm having trouble using my iTunes to buy things in games is ther something I should it keep telling me to contact support

    I'm having trouble using my iTunes card to purchase things in games keeps telling me to contact support. I can buy song so it is activated can anyone help??

    i am having the saame trouble with my audio book.  I can get music but no longer my book. and it makes me mad. help me too.

  • I am having trouble using home sharing.

    I am having trouble using home sharing. My brother is able to access my libary but I can't access his. Even though we put in his ID for me to access, it just loads and gives up. Can anyone help me out? My OS is windows vista and my brother's is windows 7.

    Welcome to the Apple Community.
    The following article(s) may help you.
    Troubleshooting Wi-Fi networks and connections
    Recommended Wi-Fi settings
    Troubleshooting Security Software

  • Having trouble using adobe

    HAVING TROUBLE USING ADOBE AFTER ITS INSTALLED... YOUTUBE, FACEBOOK GAMES.... SAYS OOPS TRY AGAIN

    You're in the Reader forum. You want http://forums.adobe.com/community/flashplayer

  • I having trouble using time machine

    I having trouble using time machine on my mac. When I click it, it wants me to set it up. When I click on that it says  to select backup disk but there is nothing on the page, it's blank.  What do I do next?

    Have you connected the Hard Drive you want to storage your backup? If the answer of this question is yes, you need to format it in "Mac OS Extended (Journaled)" It can be a NTFS drive and you are probably using macfuse to have permission to read and write it time machine can't write on NTFS (As far as I know) Hope it helped

  • Having trouble using escape sequences

    I'm trying to display a Christmas tree, but I'm having trouble using \ before the symbols. It won't compile.
        result.append("      \/\\ " + NEW_LINE);
        result.append("     \/  \\ " + NEW_LINE);
        result.append("    \/    \\ " + NEW_LINE );
        result.append("   \/      \\ " + NEW_LINE);
        result.append("   \-------- " + NEW_LINE);What could be the problem?

    Following your advice, it still won't compile. Sorry, my knowledge of Java is limited at this moment.
        result.append("      / /\ " + NEW_LINE);
        result.append("     /  /\ " + NEW_LINE);
        result.append("    /    /\ " + NEW_LINE );
        result.append("   /      /\ " + NEW_LINE);
        result.append("   -------- " + NEW_LINE);Error message:
    C:\Users\John\Desktop\ChristmasTree.java:18: illegal escape character
    result.append(" / /\ " + NEW_LINE);
    ^
    C:\Users\John\Desktop\ChristmasTree.java:19: illegal escape character
    result.append(" / /\ " + NEW_LINE);
    ^
    C:\Users\John\Desktop\ChristmasTree.java:20: illegal escape character
    result.append(" / /\ " + NEW_LINE );
    ^
    C:\Users\Johnny\Desktop\ChristmasTree.java:21: illegal escape character
    result.append(" / /\ " + NEW_LINE);
    ^
    4 errors
    Tool completed with exit code 1
    Edited by: jvu on Sep 18, 2008 6:25 PM

  • Hello. I am having trouble using Mobileme with microsoft oulook 2010. .The error Mobileme has stopped working . Can anybody help. ??Thanks

    Hello
    I am having trouble using Microsoft Outlook 2010. When starting Microsoft Outlook displays the error message Mobileme has stopped working. Can anybody help.
    Thanks

    Well yes, of course you are having trouble using MobileMe because MobileMe no longer exists and has not existed for the last 2 years at least.
    MobileMe has been replaced by iCloud, so you will never be able to use MobileMe because it does not exist.
    Also, I would suggest that you look more closely before you post, because you have posted this in an iPhone forum and this question has nothing to do with iPhones.  You would get more help if you posted in the correct forum.

Maybe you are looking for