Previous 1 2 Next 24 Replies Latest reply: May 29, 2015 2:15 PM by 7stud Go to original post
  • pjdube Level 3 Level 3 (830 points)



    Go to View in your menu bar, and make sure you click Variables.


    Screen Shot 2013-04-03 at 10.12.21 AM.JPG


    Then the variables should be at the bottom of the workflow. Just drag the variable "Original Folder" in to the "To:" field and it should replace the "Desktop". Like this:


    Screen Shot 2013-04-03 at 10.17.23 AM.JPG

  • Gerben Wierda Level 1 Level 1 (125 points)

    That almost did it. What was needed was to set 'ignore input' on a few actions or the result ended up in some temp directory somewhere deep in the system. Otherwise, the target directory was the temp directory that PDF to JPEG uses.


    Screen Shot 2013-04-03 at 3 April 18.23.44.png


    What is now left as a problem is that this temp directory (that is reused seemingly) still has a few copies of the jpeg, so if I act on foo.pdf I get foo-3.jpeg. I can remove those now as the above says where it is, but if I ever get a problem it will be difficult to find the temp directory to clean stuff out. I can't think of an wasy more robust flow.

  • pjdube Level 3 Level 3 (830 points)

    Ok. Can you post your whole workflow now so I can see what to debug?


    I am attaching the workflow I did here for you to download and see where we differ, as this works for me.




  • Gerben Wierda Level 1 Level 1 (125 points)


    Our work flows are identical. It works for me too. But during development, when the 'ignore input' flags were not properly set, the final move failed (because it moved the file upon itself). A second call the lets PDF to JPEG create a 'duplicate' file name, e.g. foo-1.jpeg. This one keeps sitting in that temp directory and messes things up.


    Removing the stray jpegs from the directory lets the flow work properly.

  • pjdube Level 3 Level 3 (830 points)

    Ok, so I tested yours... and... everything worked perfectly!


    Unless I am mistaken on what you are trying to do exactly. I ran your Service on a PDF that was in a Folder on my desktop and the below is the result. I actually ran it on a BIG PDF to make sure that it worked.


    See below. And let me know if you are trying to do something else exactly, or maybe there is some other bug that is not allowing you to run the service.


    Screen Shot 2013-04-03 at 3.05.29 PM.JPG

  • Gerben Wierda Level 1 Level 1 (125 points)

    Yes, as I said, mine works fine too.


    The effect I was looking at was the result of it running a few times when it was not OK yet. Probably you can get the same effect by running it once or a few times on the same PDF file without the last step. Then run it again on the same PDF file.


    It only happens when something has gone wrong (which was the case during development).

  • pjdube Level 3 Level 3 (830 points)

    Ok great!

  • acolyte_x Level 1 Level 1 (0 points)

    Gerben and Pjdube-


    Good afternoon!


    I have read through this thread and am interested in getting a look at the workflow's you created (wherein you both stated arriving at the same structure and results).


    This is my first attempt at Automator and I am looking to either combine multiple existing PDF's or input an Adobe form filled pdf and convert to a pdf which lacks field controls.


    Particulary how are outputs from each item in the workflow passed to the process as a whole or "ignored"?

  • 7stud Level 1 Level 1 (25 points)

    Apparently, all you need to do is copy the files first:


        Duplicate Finder Items


    The copies will be placed next to the original files, then the copies will be sent on to the next action.  If the next action is something like:


        Change Type of Images


    then Automator will tell you that the action is going to change the files, and then Automator will ask you if you want to make copies so that you can preserve the originals.  But in this case, the originals are already copies, so you can safely decline.  The Duplicate Finder Items action will not overwrite any files.  It adds 'copy' to the end of the file name, but if that file name already exists, then it will add 'copy-1' to the end of the file name, etc.  Therefore, the file name that the Change Type of Images action receives will be the name of a newly created file.


    automator_workflow copy.png


    And, if you want to change the name of the copies to something more meaningful, you can use a Replace Text in Finder Names action after the Duplicate Finder Names action.   The information in this post was inspired by:

  • 7stud Level 1 Level 1 (25 points)


Previous 1 2 Next