Page 1 of 1

Hazel w PDF Pro 8 OCR script changes dates

PostPosted: 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

Re: Hazel w PDF Pro 8 OCR script changes dates

PostPosted: Thu Apr 06, 2017 11:13 am
by Mr_Noodle
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.