I just started getting a strange error message when printing pdfs to DTP. The message says:
Finder got an error: Can’t get name of alias “BobsPowerbook:private:tmp:printing.374:Print job.pdf”.
DTP issue or did something happen with my computer? It will print PDFs to desktop or email no problem. Nothing changed on my computer. (Nothing I know about…) Anybody else ever gotten an error like this?
Locate the script “Save to DEVONthink Pro.scpt” and double-click it to open it under Script Editor. Now press Command-S to Save it to its current location The script should now work properly.
The script will be found (either at boot volume or your user directory) in /Library/PDF Services/. If this script is not in either location, in DT Pro select Help > Install Add-ons and look again.
[6] Select File > Print. When the Print panel appears, click on the PDF button and select the alias of the DT PE application, e.g., Save to DEVONthink (if you renamed it).
I am still having difficulty w/ print pdf to DevonThink Pro. Bill, followed your instructions but I get the following error now: Finder got an error: Can’t get name of alias “BobsPowerbook:private:tmp:printing.955:Printjob.pdf”.
Script can be found in ~/Library/PDFServices/Save to DEVONthink Pro
Can you open the PDF in Preview, or does Preview display an undersized view of the first page only?
If the latter, the PDF isn’t available for printing. It was imported in such a way that it remained externally linked, and subsequently the original was moved or deleted so that the path was broken.
The script does not produce a PDF only and error message.
When I first used this script I could “print to PDF” right into DTP choosing a folder in the process. It recently produced this error message with out producing any PDF file from what ever document I was attempting to put in to DTP. Currently I will “print” a PDF to desktop then import manually to DTP or highlight and use the “copy selection to…” script to get info into DTP. I like these two means b/c it allows me to select a destination folder in the process of import.
[1] Just to make certain of the quality of the script “Save to DEVONthink Pro.scpt” locate it again at ~/Library/PDF Services/ and delete it.
[2] In DT Pro, select Help > Install Add-ons to install a fresh copy of the script.
[3] In the Finder, go to ~/Library/PDF Services/ and double-click the script to open it under Script Editor.
[4] Press Command-S to Save the script to the same location, then quit Script Editor. It should work properly now (the script will not need to be opened in Script Editor in the next release of DT Pro).
To use the script to save a PDF version of any printable document into the desired location in DT Pro:
Set up File > Page Setup for the desired page size and orientation.
Select File > Print (Cmd-P), then click on the PDF button and select “Save to DEVONthink Pro.scpt”. Choose the location, then click the button.
Followed your instructions and still got an error message… : DEVONthink Pro Finder got an error: Can’t get name of alias “Bobs Powerbook:private:tmp:printing.280:Print job.pdf”.
Not sure what all this means… can still print a pdf to the desktop but not to DTP using the script.
Should I reinstall the DTP application from a fresh download?
please copy this enhanced script (will be part of v1.1) to Apple’s Script Editor and save it to ~/Library/PDF Services:
on open these_items
set this_app to (path to «constant afdregfp» as string)
if this_app does not contain "DEVONthink Pro" then
try
set this_file to item 1 of these_items
tell application this_app
try
set this_name to the name of window 1
tell application "Finder" to set the name of this_file to this_name
on error
try
tell application "Finder" to set the file_name to the name of this_file
on error
set the file_name to ""
end try
repeat
display dialog "Saving to DEVONthink Pro. Please enter a file name:" default answer file_name
set this_name to the text returned of the result
if this_name is not "" then
tell application "Finder" to set the name of this_file to this_name
exit repeat
end if
end repeat
end try
end tell
tell application "DEVONthink Pro"
activate
if not (exists current database) then error "Please open a database before using this script!"
set theDestination to display group selector "Destination" buttons {"Cancel", "OK"}
set theRecord to import this_file to theDestination
end tell
try
if this_app contains "Safari.app" then
tell application "Safari" to set this_url to the URL of document 1
tell application "DEVONthink Pro" to set the URL of theRecord to this_url
else if this_app contains "Mail.app" then
tell application "Mail"
set theSelection to the selection
set this_sender to the sender of item 1 of theSelection
end tell
tell application "DEVONthink Pro" to set the URL of theRecord to this_sender
else
try
tell application this_app
set curr_doc_path to path of document 1
if (curr_doc_path is not missing value) and (length of curr_doc_path > 1) then
set doc_url to "file://" & (POSIX path of curr_doc_path)
tell application "DEVONthink Pro" to set the URL of theRecord to doc_url
end if
end tell
end try
end if
on error error_message number error_number
try
display alert "DEVONthink Pro" message error_message as warning
on error number error_number
if error_number is -1708 then display dialog error_message buttons {"OK"} default button 1
end try
end try
try
tell application "Finder" to delete this_file
end try
on error error_message number error_number
if the error_number is not -128 then
try
display alert "DEVONthink Pro" message error_message as warning
on error number error_number
if error_number is -1708 then display dialog error_message buttons {"OK"} default button 1
end try
end if
end try
tell application this_app to activate
end if
end open
Thank you for your efforts but I still get an error with the new script- DEVONthink Pro Finder got an error: Can’t set name of alias “BobsPowerbook:private:tmp:printing.363.1:Print job.pdf” to “Test DTP”.
The name of the import file that I named was: Test DTP
Could you please tell us exactly what you are doing? For example, are you trying to send a PDF copy of a Web page being viewed in Safari to DT Pro using File > Print, and then clicking on the PDF button in the Print panel and selecting “Save to DEVONthink Pro.scpt”?
Does your computer have a selected printer?
When you copied Christian’s script into Script Editor, did you press the Compile button before saving it?
I am using a test doc made from the Apple Text Edit app. Also a Safari web page. A printer is selected although not attached…(I have a laptop w/ airport card and print through the family iMac when at home… same results w/ the selected and attached printer at office). I select print from the File menu… then from the print service menu in the dialog box choose the “Save to DT Pro…” It begins to paginate then the error message.
I did not press the compile button… just the save button. After pushing save a name was requested and gave it a simple name. Should there have been something very specific?
[/quote]
I’ve noticed in the past that the PDF Services system sometimes fails (not creating a PDF), therefore please try to print to DT Pro again and if an error should occur, switch to the Finder, choose “Go > Go To Folder…”, enter “/tmp/printing.363.1” (if the error message refers to “BobsPowerbook:private:tmp:printing.363.1:Print job.pdf” for example) and then check if the “Print job.pdf” does really exist.
I checked for the file as you directed. There is a file in that folder after printing. So I guess a PDF is being created. I opened it to check that it was my test file… it was. I also followed Bills advice about compiling the script you sent. No change. What is my next move?
Well, I’m running out of ideas at the moment but sometimes deleting both /Library/Caches and ~/Library/Caches and rebooting afterwards fixes obscure problems. Repairing file privileges is also a good idea.
Delete the entire folder or just the DTP folder with in the Cache folder? To be clear this is the Cache folder that is /user/Library/Caches
I have run the utility to repair file privileges several times. Thank you for your efforts. Pehaps when the new version of DTP comes out it will fix the issue.
I also will be taking delivery on a new MacBook Pro (2/23/06) … at least that is the date according to my order form from Apple… perhaps the problem will go away on the new machine. Question: Is DTP ready to run on the new Intel equipped Macs?