Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use built-in PDF tagging feature to help organize files System
I save dozens of web pages every week as PDFs. This allows me to store the information locally, keep the source URL, eliminate any risk of the site disappearing and me losing access to the content, and the saved documents are searchable. The issue I've been mulling for a while is how best to tag and organize the files I've accumulated.

I've looked at all the tagging and organizing applications I could find (Yojimbo, Tags, DevonThink, etc.). For my tastes, they all suffer from one of a few common limitations, all of which ruled them out for me: some applications duplicate files, some require a background process, and some had an interface I simply didn't like. Perhaps worst for me was how the applications stored tag metadata. The most common methods are an application-specific database or, worse, Spotlight Comments. The database method means all my tagging is dependent on one file, and the Spotlight Comments method has numerous instances when the metadata doesn't transfer if files are moved, such as when e-mailing files.

Snow Leopard, like Leopard before it, allows you to add keywords to a PDF when using the Print » Save as PDF feature. The big advantage of this method is that the metadata is stored in the file. Snow Leopard, though, adds a new feature that's very helpful. It now remembers previously-used keywords. If you use Print » Save as PDF to add the keyword macosxhints to a file, the next time a PDF is being saved with the Print » Save as PDF button, this keyword will be an autocomplete option if the text being entered matches. Note, though, that the autocomplete feature only seems to be available in the Print » Save as PDF dialog, though keywords added using any method in one application (e.g., TextEdit) will be available in another (e.g., Safari).

Keyword tagging can also be applied in Microsoft Office documents via the File » Document Properties dialog. TextEdit can have them added via the File » Show Properties dialog. Photoshop also allows this via the File » File Info command. InDesign and Illustrator do, too, but this metadata is not accessible by Spotlight. There are probably other applications that work, but that's what I've tested so far. Note that for any file which has keywords which Spotlight can read, the information can be seen in a Finder Get Info window by looking in the More Info section.

Once keywords have been added to files, they can be searched for by using the keyword criterion of Spotlight. Using the Find window in Finder, click the Kind button, then select Other. In the window that opens, select Keywords. To save a keyword search as a Smart Folder, simply click the Save button. For those who use the Spotlight menu, the following format allows keyword-based searches:
keyword:SearchTerm
For multiple search terms, separate them with spaces. For example, keyword:system settings. For multi-word search terms, enter them in quotes separated by spaces. For example, keyword:"operating system".

Should you ever need to edit the keywords of an existing PDF, open the file in Preview and use Tools » Show Inspector (Command-I) menu. In the Keyword tab, indicated by the Spotlight-style magnifying glass icon, you can add or remove keywords.

Since I frequently create Smart Folders for Finder-based organization, I pieced together an AppleScript to streamline the process of creating them. I'm certain someone could write this script more elegantly, but it works and has been tested in 10.5 and 10.6. The script, as written, will automatically save the Smart Folder to the Desktop folder.

display dialog "Enter Smart Folder keywords separated by spaces:" default answer "" buttons {"Cancel", "Continue"} default button 2
if (button returned of result) is "Continue" then
  set the clipboard to "keyword:" & text returned of the result
  tell application "Finder" to activate
  tell application "System Events" to tell process "Finder"
    keystroke "n" using {command down, option down}
    keystroke "v" using command down
  end tell
  delay 0.2
  tell application "Finder"
    display dialog "Name for the new Smart Folder:" default answer "Untitled Folder" buttons {"Cancel", "OK"} default button 2 with icon 1
  end tell
  if (button returned of result) is "OK" then
    set the clipboard to text returned of the result
    tell application "Finder" to activate
    tell application "System Events" to tell process "Finder"
      delay 0.3
      click button 2 of group 1 of splitter group 1 of window 1
      delay 1
      keystroke "v" using command down
      key code 36
    end tell
    set filePath to (path to desktop as text) & (the clipboard) & ".savedSearch"
  end if
end if
For those using 10.4, most of this hint applies. Keyword tagging can't be done when using Print File » Save as PDF button, but it can be done in Preview. In the Tools menu, select Get Info (not Show Inspector like in 10.5 and 10.6).

For keyword-based searching in 10.4, I couldn't find a way to do it using the Spotlight menu. This means the above script won't work. However, it can be done using the Find window method described above. As an added bonus exclusive to 10.4 users, when entering keywords in the Find window, an autocomplete feature of keywords in the Spotlight index is provided.
    •    
  • Currently 2.67 / 5
  You rated: 5 / 5 (18 votes cast)
 
[12,603 views]  

Use built-in PDF tagging feature to help organize files | 9 comments | Create New Account
Click here to return to the 'Use built-in PDF tagging feature to help organize files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use built-in PDF tagging feature to help organize files
Authored by: allanmarcus on Dec 21, '09 09:28:12AM

Check out YEP:

http://www.ironicsoftware.com/yep/index.html



[ Reply to This | # ]
Use built-in PDF tagging feature to help organize files
Authored by: NaOH-Lye on Dec 21, '09 11:26:41AM

I tried Yep. Like many applications, and I mentioned this in the post, the tags are not stored within the files. In addition, this requires multiple license to run the application on different machines. The result is that a PDF tagged with a new keyword in Yep will not retain its tags if moved to a second machine. The second machine would have to have Yep, and it would need to have the same Yep metadata file stored in ~/Library/Application Support/Yep. Plus, the PDF would have to be added to Yep for it to show.

The method I described, and I failed to mention this, makes the tags cross-platform since they are a part of the PDF. I can send a file to a Windows user or another Mac user and the recipient will have the file already tagged.



[ Reply to This | # ]
Use built-in PDF tagging feature to help organize files
Authored by: elmimmo on Dec 21, '09 05:22:34PM

Yep 2 uses OpenMeta (with its pluses and minuses). The metadata is stored on the file's resource fork. So it is a bit more flexible than you say, and it can survive *certain* computer-to-computer transitions.

I use built-in PDF/JPEG/TIFF keywords for things that describe the document in a non-personal way (i.e. would be useful to others as much as to me) to aid in searching for specific docs, but rely on Yep 2 for organizational purposes (so many of the Yep tags I use I would not want to be embedded in the file itself, just as you do not want the name of the folder the file is enclosed in to be embedded in the file itself).

Yep 2 can also read PDF built-in keywords, BTW.



[ Reply to This | # ]
Use built-in PDF tagging feature to help organize files
Authored by: prodok on Dec 22, '09 03:40:42PM

Indeed, the PDF specification allow for a whole set of Metadata (using XMP, and the Dublin Core). This built-in metadata beats any externally stored "tags", IMHO. In order to access the XMP data, the PDF document only needs to be parsed (as opposed to be opened/interpreted), as the XMP is not compressed, according to the standards.



[ Reply to This | # ]
Use built-in PDF tagging feature to help organize files
Authored by: SOX on Dec 21, '09 09:46:23AM

Check out zotero which is a firefox plug in. it will save web pages and keeps a data base of what you saved. Plus it's also content aware: if the site is a site it "knows" about it will parse the page and you can search on the info in the page.



[ Reply to This | # ]
Use built-in PDF tagging feature to help organize files
Authored by: BiL Castine on Dec 21, '09 11:24:21AM

Evernoteis a free multi platform solution (Mac Windows, iPhone, Web). links remain active, you can edit the content, share your "notebooks" with others if you like, and did i mention it's free? i store web pages there, as well as receipts and photos of anything i want to remember. i can even search text in photos (like a note scribbled on a napkin or a billboard in the subway) thanks to the server side OCR.



[ Reply to This | # ]
Use built-in PDF tagging feature to help organize files
Authored by: msadesign on Dec 21, '09 11:48:56AM

Personally, I just can't be bothered with tags, which add an entire level of embiggified hassle. I've found that a combination of History Hound and LaunchBar keep terrific indices and are very fast. No, they don't store keywords with the files. Yes, they are incredibly fast, and they are cheap, and the support is quite good.



[ Reply to This | # ]
Use built-in PDF tagging feature to help organize files
Authored by: guentherdan on Dec 21, '09 01:06:23PM

This is simple procedure in Preview.app, which can add keywords to a PDF from the Inspector (Command-I). These keywords are not Spotlight comments, but encoded into the PDF itself.



[ Reply to This | # ]
Use built-in PDF tagging feature to help organize files
Authored by: amaloney on Dec 21, '09 05:01:45PM

How does this compare to Tag Folders?
http://web.me.com/jonstovell/Tag_Folders/Tag_Folders_Home.html



[ Reply to This | # ]