Help with Adding a pdf to the Paperless App

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Hi,

Im trying to add a pdf document the Paperless App from Mariner Software. I can get the file to add to Paperless but I cant get the title or tags to set. Anyone have any ideas?



set this_file to theFile
set the_category to "Personal"
set the_title to "The Title"
set the_tags to "software"
set theLibraryName to "Paperless Library"

tell application "Paperless"
activate

set theDoc to (the first library whose name is theLibraryName)
tell theDoc
set result to make new document with properties {title:the_title, tag:the_tags, category:the_category, file:this_file as alias}
add result without prompting
end tell
end tell

1. The title is never set
2. If I keep the tag property the document never gets added.

Anyone know what I am doing wrong?
scottfwalter
 
Posts: 49
Joined: Thu Jan 03, 2013 11:10 am

Quick follow up. If I watch the paperless window the title gets set and then unset very quickly.
scottfwalter
 
Posts: 49
Joined: Thu Jan 03, 2013 11:10 am

Does this script work outside of Hazel?
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

After posting to the Mariner forum I found this out:

1. The disappearing title was not AppleScript related, it would also lose the title if I dragged a pdf onto Paperless. They had me go into the Library Configuration and delete a blank title. I don't know how the blank title ever got in there in the first place.

2. Paperless doesn't support tagging via AppleScript.
scottfwalter
 
Posts: 49
Joined: Thu Jan 03, 2013 11:10 am

Perhaps Paperless stores its tag information within the file's metadata (instead of an internal database). If that is the case, you may be able to add the tag information independent of the Paperless API.

I'd check a Paperless tagged document with mdls to see if the tag appears.
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado


Return to Support