Hazel processes multi-page PDF before scanning is complete

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I am using OS X's Image Capture application to scan a multi-page document into a single PDF file. However, my Hazel rule begins processing the file as soon as the first page is scanned rather than waiting for the entire scan.

Is there a way to prevent Hazel from processing the file until the scan operation completes?
mgoldner
 
Posts: 1
Joined: Tue Oct 23, 2012 11:17 am

I'd suggest putting a time limit on your scans. I believe that OSX releases the file after ever page is scanned to prevent losing the whole file if a single page contains an error.

Code: Select all
if (all) of the following conditions are met for the (current file or folder)
    date created is not in the last 5 minutes
    kind is PDF

Do the following to the matched file or folder:
    ...  whatever you  like ...
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Alternately, you could add a condition to check if the image capture app is still running, as shown here.

For the passes applescript line:

Code: Select all
tell application "System Events" to return not ((name of processes) contains "Image Capture")


This will run your rules only when you shut down image capture.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Even simpler - in your hazel rule set a condition so that files not modified in the last xx mins are processed. This way when xx mins is up the file will be picked up.
ilium007
 
Posts: 23
Joined: Sun May 01, 2011 5:42 pm


Return to Support