Jump to content

lucasgpr

Member
  • Posts

    2
  • Joined

  • Last visited

Reputation Activity

  1. Like
    lucasgpr reacted to jdfwarrior in Search in pdf files   
    Alfred can indeed search within the contents of a PDF document but it wouldn't open the document to the location that the search term was found in the document, it would only open the document. This COULD be done would be rather tricky and would take a bit of a custom workflow to achieve it. You would have to create a workflow to save the search text, then using a script filter search for matching files manually. After a file is selected, using the remaining portion of the workflow to open it, and then search (using Preview?). The search could be done using AppleScript like this:
    tell application "Preview" activate tell application "System Events" tell process "Preview" click menu item "Find…" of menu "Find" of menu item "Find" of menu "Edit" of menu bar item "Edit" of menu bar 1 keystroke "{query}" end tell end tell end tell Where {query} would be replaced by the search text
×
×
  • Create New...