The PDF is downloaded from online banking into my Downloads folder.
Hazel renames and imports the PDF to DevonThink with the following apple script:
tell application id "DNtp"
launch
set theDatabase to open database "/Users/username/Databases/Paperless.dtBase2"
set theYear to do shell script "awk -F: '{print $NF}'<<<" & theFile & "| awk -F- '{print $1}'"
set theLocation to "/Banking/Credit card/" & theYear
set myGroup to create location theLocation
set myRecord to import (POSIX path of theFile) to myGroup
set label of myRecord to 1
set tags of myRecord to {"Banking", "Credt card"}
end tell
The PDF is imported into DevonThink with the kind: Document
!
The PDF will not preview from within Devonthink - instead showing a pixelated CD disc with a rainbow shooting star icon.
Right-click, open on the PDF opens a window showing a more significant pixelated CD with a rainbow shooting star icon.
Right-click, Open with
→ Preview
displays the PDF file as expected.
There doesn’t appear to be any way to view the PDF within Devonthink.
Alternatively, if I drag ’n drop the PDF from the Downloads folder directly into Devonthink - the kind is: PDF+Text and the PDF previews within Devonthink without issue as expected.
How does one import the PDF with the “correct” kind of PDF+Text
with Applescript and prevent the “Document-kind” from beaming in?