Hazel w PDF Pro 8 OCR script changes dates

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

Moderator: Mr_Noodle

Hazel w PDF Pro 8 OCR script changes dates Thu Apr 06, 2017 7:48 am • by upstartguy
Hi,
I use Hazel to monitor a folder and OCR any pdf as soon as it enters. Unfortunately, it changes both the creation and modification date to when the OCR was performed. Any ideas about how to fix this? See script pasted here. I don't seem to be able to post a screenshot of the Hazel Rule.

tell application "PDFpenPro"
open theFile as alias
tell document 1
ocr
repeat while performing ocr
delay 1
end repeat
delay 1
close with saving
end tell
tell application "PDFpenPro"
quit
end tell
upstartguy
 
Posts: 3
Joined: Sat Sep 27, 2014 2:40 pm

That's more a function of PDFpen since it's doing the OCR. Changing the modification date is unavoidable as it is modifying the file. The creation date change may be because it is creating a new file to overwrite the old one. You will have to consult them on that.

One workaround is to put the creation date in the comments then parse that back out after the OCR.
Mr_Noodle
Site Admin
 
Posts: 11880
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support