Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

newbie automator question: save file

I have created my first Automator workflow. Pretty simple, I have used the PDF to image action. Now, this works, but the file is saved somewhere in /var/folders. What I want is a service that takes the selected PDF files and renders them to JPEG at a certain dpi and quality (so far so good) but that then saves it next to the PDF file already there. I tried getting tthe filename and using that in a follow-up action, but that hasn't worked. I can get the rendered image file in a mail message and I can see it ending up in /var/folders when I just use the PDF to image action.


But I can't find an action or combination of actions that gets me the result file in the right location (same as source).


Can someone help?

Posted on Aug 14, 2012 4:04 PM

Reply
24 replies

Aug 18, 2012 4:56 AM in response to Frank Caggiano

OK, thanks for wanting to help. I thought I had posted my workflow. It is a Service Workflow that consists of one single Library Action: from the PDFs Actions I have the Action "Render PDF Pages as Images". What this action does is create jpeg files. If I select the file Foo.pdf in Finder and select the service, I end up with Foo.jpeg in a temporary directory somewhere in /var/folders.


If you mean something different by 'posting my workflow', please tell me what you mean. I can post the XML in the document.wflow inside the Contents of the .workflow bundle (but that is just a standard Automator Library action)

Aug 18, 2012 5:10 AM in response to Gerben Wierda

By posting the workflow I meant to post a screen capture of the workflow open in Automator. Just makes it easier and less prone to error if we can see what you have actually done.


But I think in your case try adding a Move Finder Items after the Render PDF Pages as Images. That should allow you to put the files where you like.


User uploaded file


Post back if that isn;t what you are looking to do.


regards

Aug 23, 2012 1:38 PM in response to Frank Caggiano

Thanks & yes that I what I am doing. I looked at that Move Finder Item Action. But that only gives me the possibility to put it somewhere static and specific. I want the resulting JPEG to end up next to the PDF I have rendered. I do not want all of them to end up together in one big heap in a single location.


So what I have been trying to find is a way to find out the directory part of the file path sent to this service, then use that directory part of the file path as the target for Move Finder Item.

Mar 31, 2013 4:05 PM in response to pjdube

Two step workflow now (as depicted above by Frank):


Service receives selected PDF files in Finder.app

1. Render PDF Pages as Images

2. Move Finder Items (replace existing) to a fixed folder on my Desktop


But what I'd really like is if the JPEG renders would end up next to the original PDF files in the directory where the PDF file came from. I have been trying a few things, but none of these have worked. So, the JPEG files keep up ending in that same target folder.


What I want to do (but don't know how in Automator)


1. From a selected PDF file in Finder, split the full path into folder, basename,'.pdf'

2. Create folder/basename.jpeg from folder/basename.pdf

Apr 3, 2013 9:08 AM in response to pjdube

Almost there. But what I can't do is use the "Original Folder" variable in the final "Move Finder Items" action. How do I set that? "Move Finder Items" only gives met the options of a list of directories and a "New Variable" which turns out to be a fixed variable I can set to a certain fixed folder.


User uploaded file


How do I use that "Original Folder" variable for "Move Finder Items"?

newbie automator question: save file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.