Wie kann ich die Tags die ich in Devonthink vergeben habe in PDFs einbinden damit sie mit exportiert werden? Ich habe in dem “normalen” Infofenster div. Schlagwörter vergeben. Diese werden aber ja, wenn ich ein PDF exportiere, nicht mitgenommen. Jedenfalls kann ich sie nach dem Export in keinem Viewer sehen (obwohl ich sie beim Einzelexport sogar noch extra vergeben kann). Wenn ich Schlagwörter im Kasten Eigenschaften eintrage werden diese exportiert. Gibt es einen Automatismus um die Tags vom Infokasten auch in die Eigenschaften zu kopieren um die Tags fest in das PDF zu schreiben?
Wenn du DevonThink Pro Office hast kannst du AppleScript nutzen in Verbindung mit “ExifTool” von Phil Harvey
Ich nutze derzeit das Programm um bei meinen Bildern Tags hinzuzufügen. Mit diesem Tool kann man auch bei PDF Keywords hinzufügen, ich habe das bei 2 PDF ausprobiert.
tell application id "DNtp"
try
set theSelection to selection
if theSelection is {} then error "Please select some contents."
#Progessbar
set theSelectCount to count of theSelection
show progress indicator "IPTC Keywords to Tag" steps theSelectCount with cancel button
repeat with thisItem in theSelection
step progress indicator (name of thisItem) as string
if the type of thisItem is equal to PDF document then
#Pfad zur Datei auslesen
set thisPath to path of thisItem
#Keywords auslesen
tell current application
set theKeywords to (do shell script "/usr/local/bin/exiftool -PDF:keywords " & quoted form of thisPath) as string
end tell
#"Keywords :" löschen um nur die Keywords zu haben
set theKeywords to (characters 35 thru (count of theKeywords) of theKeywords) as string
#Keywords trennen
set AppleScript's text item delimiters to ","
set theKeywords to text items of theKeywords
#Keywords zählen
set Counter to count text item of theKeywords
#Keywords zu einem String zusammen fügen
set TheTag to text item 1 of theKeywords
if Counter > 1 then
repeat with i from 2 to Counter
set thisTag to text item i of theKeywords
set TheTag to TheTag & ";" & thisTag
end repeat
end if
set AppleScript's text item delimiters to ""
#Tag hinzufügen
set AppleScript's text item delimiters to ";"
set theTags to text items of TheTag
set tags of thisItem to theTags
set AppleScript's text item delimiters to ""
end if
end repeat
hide progress indicator
on error error_message number error_number
log message "Keyword to Tag" info (name of thisItem)
hide progress indicator
if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
end try
end tell
Tag to Keyword
tell application id "DNtp"
try
set theSelection to selection
if theSelection is {} then error "Please select some contents."
#Progessbar
set theSelectCount to count of theSelection
show progress indicator "Tag to IPTC Keywords" steps theSelectCount with cancel button
repeat with thisItem in theSelection
step progress indicator (name of thisItem) as string
if the type of thisItem is equal to PDF document then
#Tags auslesen
set TheTags to tags of thisItem
#Pfad zur Datei auslesen
set thisPath to path of thisItem
#Keywords hinzufügen
set theKeyword to ""
repeat with thisKeyword in TheTags
if theKeyword is "" then
set theKeyword to "-PDF:keywords=" & quoted form of thisKeyword
else
set theKeyword to theKeyword & " -PDF:keywords=" & quoted form of thisKeyword
end if
end repeat
tell current application
do shell script "/usr/local/bin/exiftool -overwrite_original " & theKeyword & " " & quoted form of thisPath
end tell
synchronize record thisItem
end if
end repeat
hide progress indicator
on error error_message number error_number
log message "Tag to Keyword" info (name of thisItem)
hide progress indicator
if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
end try
end tell