Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Use Automator for manipulating Scanned PDFs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use Automator for manipulating Scanned PDFs
Authored by: tedw on Jul 13, '10 09:42:15AM
Actually, this can be done with Apple provided technology entirely (e.g., without using PDFtk). Make a workflow with the following actions:
  • Ask for Finder items - to select the 'odd' page scans
  • Ask for Finder items - to select the 'even' page scans
  • Run applescript - to sort the files into the correct list order. Use the following script
    on run {input, parameters}
    	-- interlace files
    	set output to {}
    	set midpoint to round ((count of input) / 2) rounding up
    	repeat with i from 1 to midpoint
    		-- work from beginning of list for odd pages
    		set end of output to item i of input
    		-- work from end of list for even pages
    		set j to (count of input) - i + 1
    		if j > midpoint then
    			set end of output to item j of input
    		end if
    	end repeat
    	return output
    end run
  • New PDF from images - takes the sorted file list and creates a PDF from it.
Make sure that multiple selection is enabled on each of the Ask actions, and that all the actions accept input from the previous actions.
Edited on Jul 13, '10 09:45:20AM by tedw

[ Reply to This | # ]