automatically OCR documents in inbox?

Is there a way to say to DTPO that it should automatically OCR every document in he inbox
(or in another specific folder?)

I need this is

  • as workaround for my actuel DTPO Version that doesn’t work with my brother Control Center (the interface of my network printer/scanner)
  • and also think that this could be a good feature (when adding screenshots or images in DTPO, they all should be OCR’d as its the case in Evernote)

Thank you

Not yet. But a future version will support this. And it won’t be just another preference, it will be a much more flexible approach.

And meanwhile, there is no way to do this with a script?

A triggered script (see Info panel) attached to the desired group(s) should be possible. Here’s a simple draft:


on triggered(theGroup)
	tell application id "DNtp"
		set theRecords to children of theGroup
		repeat with theRecord in theRecords
			if type of theRecord is PDF document and word count of theRecord is 0 then
				convert image record theRecord without waiting for reply
				move record theRecord to (trash group of database of theRecord)
			end if
		end repeat
	end tell
end triggered

i do the following.

I have created a folder and attached the following script as folder action.
it checks whether a file needs OCR and in case it does, it OCRs it, else it imports without:


on adding folder items to this_folder after receiving added_items
	try
		if (count of added_items) is greater than 0 then
			tell application id "DNtp"
				launch
				open database "/Users/UserName/Path/to/my.dtBase2"
			end tell
			repeat with theItem in added_items
				try
					set thePath to theItem as text
					if thePath does not end with ".download:" and thePath does not end with ".crdownload:" then
						tell application id "DNtp"
							-- OCR needed?
							if thePath ends with ".pdf" then
								set theRecord to ocr file thePath to incoming group
							else
								set theRecord to import thePath to incoming group
							end if				
							— delete source file
							if exists theRecord then tell application "Finder" to delete theItem
							-- Fenster nach vorn
							set miniaturized of windows to false
							activate
						end tell
					end if
				end try
			end repeat			
		end if
	end try
end adding folder items to

now i only need to throw a file into that folder, and the scripts moves into my database and its inbox, does an OCR if needed and cleans up.

The script is an alternation of the already existing "DEVONthink - Import, OCR & Delete“, and a result of the help of the users korm and cgrunenberg. I did the very fewest in that :slight_smile: