Using FIneReader to OCR files

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

Moderator: Mr_Noodle

Using FIneReader to OCR files Thu Sep 03, 2015 11:41 pm • by dragonlady
I have 3 problems/questions:

1) I expect there is a way to detect if Abbyy FineReader executed successfully or had an error but I am not sure how to do it.

2) When FineReader runs, the date added and date created are set to the current date/time along with Date Last Opened and Date Last Modified. Is there a way to maintain the date added and date created as happens when I run the application manually?

3) What I really want to do, is run Fine Reader only if a new pdf is added, or if a pdf is modified by other than FineReader. Any ideas on how to accomplish that?

My apple script (which was found elsewhere on this forum):

on hazelProcessFile(theFile)

using terms from application "FineReader"
set langList to {English}
set saveType to single file
set exportmodepdflayout to "text under the page image"
set keepPageNumberHeadersAndFootersBoolean to yes
set keepImageBoolean to yes
set imageOptionsImageQualityEnum to high quality
set usemrcboolean to no
set makepdfaboolean to yes
set pageSizePageSizeEnum to automatic
set increasePaperSizeToFitContentBoolean to yes
end using terms from

WaitWhileBusy()

tell application "FineReader"
export to pdf theFile from file theFile
end tell

WaitWhileBusy()

end hazelProcessFile

on WaitWhileBusy()
repeat while IsMainApplicationBusy()
delay 10
end repeat
end WaitWhileBusy

on IsMainApplicationBusy()
tell application "FineReader"
set resultBoolean to is busy
end tell
return resultBoolean
end IsMainApplicationBusy
dragonlady
 
Posts: 3
Joined: Fri Oct 11, 2013 11:59 pm

Re: Using FIneReader to OCR files Fri Sep 04, 2015 3:06 pm • by Mr_Noodle
1 & 2 are more questions for FineReader. You should contact their support on how to deal with that. As for #3, there's no general way to tell what program modified a file. If FineReader is modifying the file only through your script, then you can maybe add a thing to the script to tag the file or leave some other telltale sign so you can filter those files out.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron