Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Big Ben 99

macrumors newbie
Original poster
Oct 31, 2013
8
0
Hi !

I am looking for a PDF printer for which I can choose the destination folder.
All PDF printers I have tried store the output to the user' shared directory.

Anyone knows such printer ?
 
Mac OS X has the print to PDF feature in it already, why do you need an App?
Select Print and the look at the left bottom corner for the drop down.
 

Attachments

  • Screen Shot 2013-11-06 at 5.51.41 PM.png
    Screen Shot 2013-11-06 at 5.51.41 PM.png
    51 KB · Views: 54
Mac OS X has the print to PDF feature in it already, why do you need an App?
Select Print and the look at the left bottom corner for the drop down.

I should have been more precise.

My printer is a Kyocera FS-720 for which no Mac driver exists.
In order to use it I have a virtual machine running Win XP where this printer is installed.
A small program is installed on this VM and is looping on a folder, printing any file dropped on it.
A share folder is described on both Mac and Windows side

So the goal is :
1) On Mac side, printing action creates a PDF file
2) This PDF file should be automatically dropped on the shared folder
3) On VM side, the program handles the printing and moves the printed doc to a new location (or just delete it).

That's means for me that printing a document just only consist of a printing action.
;)
 
why not just use a folder action that watches for pdf files being added to the default folder that these pdf printers are placing them in, and then moves them to the folder of your choice?


e.g. I've set script below as a folder action on my Public folder, so everytime a pdf goes into the Public folder it gets moved to tester2 folder on my desktop


Code:
on adding folder items to this_folder after receiving added_items
	set destFolder to "Macintosh SSD:Users:stevenc:Desktop:tester2:"
	tell application "Finder"
		set thePDFs to files of this_folder whose name extension is "pdf"
		move thePDFs to destFolder
	end tell
end adding folder items to
 
why not just use a folder action that watches for pdf files being added to the default folder that these pdf printers are placing them in, and then moves them to the folder of your choice?

Well I have achieved this using Automator, but I am really interested on understanding your solution.
How did you do this scripting ?
 
fired up applescript editor
right clicked on the blank script
chose 'Adding to folder' from the 'Folder Action Handlers'

got me the

Code:
on adding folder items to this_folder after receiving these_items
	-- insert actions here
end adding folder items to

part

a quick google for a move pdfs applescript got me the actions to stick in the middle :)

after that its just a case of saving the script to my desktop, browsing to Library/Scripts/Folder Action Scripts and dragging n dropping it in there

With the applescript now in proper place I went to my Public folder, right clicked on it, chose Folder Actions Setup and chose my new script from the list of folder actions

took more time to type this than do it :)
 
I coded this:
Code:
on adding folder items to "private:var:spool:pdfwriter:bigben11:print:To Be Printed" after receiving added_items
	set destFolder to "Users:bigben11:Documents:Windows:To Be Printed:Kyocera_FS-720_KX"
	tell application "Finder"
		set thePDFs to files of "private:var:spool:pdfwriter:bigben11:Print:To Be Printed" whose name extension is "pdf"
		move thePDFs to destFolder
	end tell
end adding folder items to

But no result :(

Does the script runs by its own ?
Is the path correct ?
 
if you wanted to test the logic as a user runnable script you'ld need to ditch the event driven element that looks for pdf files being added to a folder before the script runs (ie you cant just type it into apple script editor and run it directly using the applescript editor run button)

something like this would run within applescript editor

Code:
set sourceFolder to "Macintosh HD:private:var:spool:pdfwriter:bigben11:print:To Be Printed:" as alias 
set destFolder to "Macintosh HD:Users:bigben11:Documents:Windows:To Be Printed:Kyocera_FS-720_KX:"
	tell application "Finder"
		set thePDFs to files of sourceFolder whose name extension is "pdf"
		move thePDFs to destFolder
	end tell

that'll move any pdfs already in the source folder over to your destination any time you run it but isn't exactly the same script as you'ld use for the event driven folder action


even with the event driven code added back in, the script saved and moved to appropriate place, attached as a folder action to a folder etc I dont think your take on it would work for following reasons


Code:
on adding folder items to "private:var:spool:pdfwriter:bigben11:print:To Be Printed" after receiving added_items

1 when your creating the script for use as a folder action use this_folder to define the source, don't put the explicit source path in there

Code:
	set destFolder to "Users:bigben11:Documents:Windows:To Be Printed:Kyocera_FS-720_KX"

2 explicit path is what you need for destination, but you've not included the volume in the destination path (Macintosh HD: or whatever you're drive is called)

Code:
	tell application "Finder"
		set thePDFs to files of "private:var:spool:pdfwriter:bigben11:Print:To Be Printed" whose name extension is "pdf"

3 again the source needs to be implied using this_folder rather than the explicit path


I'd go with following as the script (note it it assumes your drive is called Macintosh HD, so edit that if neccessary)

Code:
on adding folder items to [B]this_folder[/B] after receiving added_items
	set destFolder to "[B]Macintosh HD:[/B]Users:bigben11:Documents:Windows:To Be Printed:Kyocera_FS-720_KX:"
	tell application "Finder"
		set thePDFs to files of [B]this_folder[/B] whose name extension is "pdf"
		move thePDFs to destFolder
	end tell
end adding folder items to

bang that into apple script editor and do following


1 save the script to your desktop as MovePDFs

2 stick a copy of it into Library:Scripts:Folder Action Scripts

3 find your To Be Printed folder in finder, right click on it and choose Folder Actions Setup

4 in the dialog box that appears choose the MovePDFs script from the list and click Attach

5 make sure the Enable Folder Actions check box is ticked

6 print a pdf
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.