"Download" PDF to DT

I think there is a very common task:
From within a browser I want to right-click a link to a PDF file and save this file in a folder on my HD. Now, I want DT to auto import this file.

When I use folder actions and the “Action Import” script, DT starts importing as soon as the file begins to download. This produces an error and imports a .plist file into DT.

A soon as the file has finished downloading, the PDF file is imported as expected.

Is there a way I don’t know to do this better or is there a way to modify the script to prevent it from importing on starting download?

I don’t want to use the “Save to DEVONthink” print service, as for me it modifies the PDF (text will no longer be recognised as text).


The following script skips the temporary downloads created by Safari:

on adding folder items to this_folder after receiving added_items
		tell application "DEVONthink" to launch
		repeat with theItem in every item of added_items
				set thePath to theItem as text
				if thePath does not end with ".download:" then
					tell application "DEVONthink" to import thePath
				end if
			end try
		end repeat
	end try
end adding folder items to

Thank you for your suggestion! I will give it a try.