Devonthink Usage Scenario – Notecarding an image PDF

My post ideas are usually extremely long and involved, which means I have a few dozen drafts that aren’t finished. So I’ll take a different tack for DT and just include a series of short-ish post on how I’m using DT now, showing a variety of usage scenarios with screen shots. 1100 words isn’t particularly short for a blog, but it’s my blog.

Unfortunately nobody that I know of has come up with a typology of the types of notes one might take, beyond the barebones. So I’m calling this one the RTF-notecard-from-specific-page-of-image-PDF technique. Not quite ‘flying crane’, but I lack the Buddhist monks’ combination of wisdom and careful observation of the natural world. This post largely explains the process that replaces what I described in an earlier post, with thanks to korm on the DT support forum for the Applescript which I then tweaked.

Say you’ve got a PDF of a primary source without text (OCR doesn’t work) in DT. It could be a scanned volume of archival documents, could be an old book.

1. I open the PDF in a separate window, move and resize the window to fill more than half the screen, and zoom in to a comfortable reading level.

2. Start reading.

3. When I come across something that is worth taking note of, I take note of. Specifically, I select the page: either Cmd-A, with the focus in the page (not the thumbnails), or just drag across the page. You don’t need to actually select any text per se, which helps because there isn’t any text in an image-only PDF.

4. Then I invoke the New RTF from Selected Text with URL to PDF macro (Ctl-Opt-Cmd-P for me), as discussed in the aforementioned post. This prompts you to title the new document.

Name it and you have power over it

Name it and you have power over it

I overwrite the default (the name of the original PDF file), and instead use a substantive title, like an executive summary of the point being made, e.g. Tutchin says the French are morons. This popup window is really helpful because it forces you to make a summary. Remember that efficient note taking requires a brief summary, which relieves you from having to reread the same quote (possibly several sentences or even a paragraph) every time you need to figure out what it says. One of the most useful examples is how naming your files by summary makes it much easier to plow through Search results when you’re performing a needle-in-a-haystack search.

Impact of Naming conventions on Search results

Impact of Naming conventions on Search results (from a previous post)

In needle-in-a-haystack searches most notes aren’t what you’re looking for – you need a quick way to discard false hits. In many other instances you’re looking for a specific variation on a theme – you need a quick way to distinguish similar items. Thus, a summary title allows you to quickly see that a specific note isn’t on the right topic; it similarly allows you to quickly find a certain variation on the general theme of French stupidity, for example. Having columns to sort the search results by would also facilitate this.

5. After I’ve named the RTF note and hit Enter, I’m prompted to send it to a particular group

Select group (not tag)

Select group (not tag)

For the purposes of speed I usually just default to the Inbox by pressing Return and then use the Auto-Classify to help me process them (in the Inbox) in a single session. But you could, if you want, find the proper group (not tag however), and then that will be the default group from then on. Usually, though, the same PS will be addressing different topics, which would require navigating my 1000s of groups in that tiny little window. So I go for speed at this phase.

Then the code does more magic. It adds a link from the original PDF to the new RTF note (in the URL field, which is the blue link at the top of the RTF). This allows you to jump back to the original whenever you want. The code also copies the title of the PDF file to the Spotlight Comments of the new RTF field (Bonus material: I use the Spotlight Comments as another place to put the provenance info – that way if I ever need to cite a specific file, I can just select the record in DT’s list pane, Tab to the Spotlight Comments field, Copy the already-selected text and then paste it elsewhere). The code also opens up the new RTF in its own window (which you may need to relocate/resize), and pastes the file name into the content of the RTF file. I do that last step because the AI only works on alphanumeric characters within the file, not the file name or other metadata.

Original and notes side by side

Original and notes side by side

6. Now the blinking cursor is in the RTF, with the original image visible, just waiting for your input. You can make further notes and comments, or transcribe however much of the PS you desire.

7. Then you add additional tags or groups in the Tag bar of the RTF (Ctl-Tab from the content pane). You can also run Auto-Classify (the magic hat) if you want to move it to a different group, or have other suggested groups that you then manually enter in. (Remember that Auto-Classify moves the record to a different group, so don’t use it if you’ve gone to the trouble of already selecting a group in step 5).

8. When you’re all done with this single notecard, close it. Now you’re back to the original PDF where you left off. Continue your reading and repeat the process to your heart’s content.

9. If you send all your RTF notes to the Inbox, you’ll need, at some point, to go to the Inbox and assign the notecards RTFs to groups, either with Auto-Classify or by assigning your own tags. If you manually add tags to files in the Inbox, their file names will turn red (indicating there are aliases – aliasi? – in several groups). You’ll then need to get them out of the Inbox (reduce clutter) by dragging them to the Untagged group you’ve already created, then run the Remove Tags from Selection macro on the selected Untagged files.



All this may sound complicated at first, but it becomes second nature once you’ve done it a few times, and once you understand how Devonthink works in general. The busy work of opening and tagging and such only takes a few seconds per note – certainly no slower than writing a physical notecard.

Tags: ,

8 responses to “Devonthink Usage Scenario – Notecarding an image PDF”

  1. jostwald says :

    I tweaked the code a bit at Step 7, so that it automatically creates the original PDF’s tags in the new RTF note document (because I use tags for provenance, as well as putting them in the Spotlight Comments). You can then jump down to the tag bar and add whatever additional tags you want.

    • Joshua Sargent says :

      Thank you so much for sharing your ideas/methods/content…I am learning a lot! Can you please share this AppleScript in its current state?

      I read through the forum thread and got most of it, but there are pieces not included, such as:

      “I figured out how to prompt to name the file and also how to add the file name (in my case, the source citation) to the Spotlight Comment. I then rename the file something substantive, like a summary.”


      “I tweaked the code a bit at Step 7, so that it automatically creates the original PDF’s tags in the new RTF note document (because I use tags for provenance, as well as putting them in the Spotlight Comments). You can then jump down to the tag bar and add whatever additional tags you want.”

      Thanks again!!!

      • jostwald says :

        I believe this is the script:
        -- Save selected text as RTF
        -- Experimental: 20120829 revised Use at your own risk. Loss of data is your risk.
        --Open RTF added by korm 20140818 by korm
        -- Select some text in a document in DTPO
        -- Script creates an RTF whose URL is a link that page of that document
        -- Does not open the document with the text highlighted
        -- When clicked in DT, opens the document in a new window (open in tabs seems not work)
        -- the default new file name is the same as the source file; a default prefix and/or suffix can be defined here

        --Additional modifications (prompt for file name, add PDF file name to Spotlight Comment) added 20140818 by ostwaldj.
        --Additional modification (add Provenance tag from orig PDF to new RTF) added 20140918 by ostwaldj.

        property suffix : ""
        property prefix : ""
        property askName : true

        tell application id "com.devon-technologies.thinkpro2"

        set theSelection to selection
        if theSelection is {} then
        error "Please Select Something"
        end if

        --display dialog "Enter file name:"
        --copy the result to
        repeat with thisItem in theSelection

        set theText to selected text of think window 1

        if theText is {} then
        error "Select some text"
        end if

        set theTags to tags of thisItem

        set theName to prefix & name of thisItem & suffix
        set theComment to name of thisItem
        if askName then
        set theName to the text returned of (display dialog "File name" default answer theName)
        end if

        if the current page of think window 1 ≠ -1 then
        set thePage to "?page=" & ((the current page of think window 1) as string)
        end if

        set theUrl to reference URL of thisItem & thePage
        -- if a hardcoded destination is desired, change the following line
        set theDocument to create record with {name:theName, type:rtf, URL:theUrl, rich text:theName & "
        " & theText, comment:theComment, tags:theTags} in display group selector
        open window for record theDocument
        end repeat
        end tell*

  2. Anita Kellogg says :

    I love your posts on DevonThink and your note taking code is a lifesaver for me. The part of my workflow, where I am really struggling is setting up an organizational system in DevonThink that makes it easy to find the right quotes/notes when I’m ready to write. Do you have any suggestions? Thanks!

    • jostwald says :


      If you are just asking about *finding* quotes, you need to combine metadata and full-text. For me it boils down to having a comprehensive system of groups and tags and metadata in the Spotlight Comments. Since much of my searching is through image-only PDFs, and since I’m often looking at how contemporaries responded to particular events, dividing my sources up into years is crucial, e.g. I break each archive volume up into separate PDFs for each year. Then if I want to know how contemporaries responded to a battle, I go (or search) for all the documents between 20 April 1706 and [insert later date here], or at least I look for all the archive volumes that cover the year 1706. That requires a lot of manual parsing on the front end and skimming during the search process, but there isn’t really an alternative. This isn’t fine grained searching, but most of my sources are only scans so I necessarily need to plow through images of manuscript documents. If there’s a good quote, I’ll transcribe it and put it in a group for later use.

      DT’s AI (e.g. See Also/See Related Text) can be helpful if you have a lot of full-text documents, and if you don’t/can’t take the time to tag and group and parse the documents. You can, for example, just write some prose of your own (maybe a bunch of keywords) and the AI should find similar documents. Personally I prefer to classify things into groups (and sub-groups) for more permanent storage – if topic X comes up, I go right to that topic X group, rather than have to slog through a bunch of See Also/See Related Text results. Though I might then use See Also to find additional evidence.

      Nevertheless, I’ve still had a couple of occasions where there was a specific quote/anecdote that I wanted to find, but I couldn’t remember enough about it to find it in DT. Only later did I remember where I’d read it in the first place. Normally though, as I’m reading a primary source and come across a quote, I’ll immediately know what topic/argument it relates to, so I can assign it to a group right away. That’s always the best bet.

      But if you’re asking about using DT in your drafting process, that’s more difficult. I am still working on the integration of DTPO with writing/composing. A recent conference paper was my first attempt, which consisted of me copying notes and quotes from DTPO to Scrivener. I like Scrivener’s ability to ‘chunk’ bits of prose, but I have yet to figure out how best to combine DT and Scrivener. I ended up with dozens of ‘notecards’ in Scrivener, trying to keep them in thematic chunks of prose and pasting my Spotlight Comment citations into Scrivener footnotes. But I’m not sure my first test was a complete success.

      For me the next step is to aggregate upwards from single note RTFs into larger arguments. As I mentioned in a post, the Devonthink forum has some script that will combine all the selected records into an index-type single document, with links back to the original records. In ye olden days I created similar topical summary sheets in Word.

      If you wanted to do more of the organizing and early drafting in DT, you could create separate Project groups with duplicated records, and manually sort them into whatever logical order you’ll present them in. DT doesn’t have footnoting ability, so you’d need to decide how early you want to add footnotes, and switch over accordingly.

      • Anita Kellogg says :

        Thanks for your reply, and I apologize for the delinquency of my response. What I really want is someone to teach me a magical formula that would tag all quotes with just the precise meta-data so that it could be easily found again when I’m writing my argument. Since, I have yet to stumble onto that spell, I’m becoming convinced that careful outlining has to accompany the note-taking process. At least, that is what I’m attempting now. Thanks for all of your tips. I really appreciate them.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: