"Error while printing" message

When I view a PDF in the Preview function, I do a Print, and then Save as PDF to DEVONThink.
It shows me the Processing Page dialogue, and on the last page, it pops up an “Error while printing” box.
I can however print pdf to other apps.

It did work at one time. I may be crazy, but it seems to have stopped working after I did the following:
I opened a PDF document in Preview and added an Annotation. I then wanted to see if Devonthink would save this annotation so I did a Save PDF to Devonthink. Thats the first time I got the error.
Now ANY document I try to save to DT , whether annotated or not, yields an error.

Which version/edition are you using?

I’m using pb 4, and I am having the same problem. I can save a pdf from MS Word or safari using the print menu, but I get an error message when I try to do the same from Evernote and Mellel. I haven’t tied other programs.

any ideas?

thanks,

Matt

Replace “Save PDF in DEVONthink Pro.scpt” with this script and it should support unscriptable applications like Mellel again:


on open these_items
	try
		set app_name to name of current application
		set this_app to (path to frontmost application as string)
		if this_app does not contain "DEVONthink Pro" then
			try
				set this_file to item 1 of these_items
				
				try
					tell application this_app to set this_name to the name of window 1
					if not (exists this_name) then error
				on error
					set this_name to "Print Job " & app_name
				end try
				
				tell application id "com.devon-technologies.thinkpro2"
					if not (exists current database) then error "Please open a database before using this script!"
					set theRecord to import this_file from app_name name this_name
					if not (exists theRecord) then error "Import failed."
				end tell
			on error error_message number error_number
				if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
			end try
		end if
	on error -- Active application isn't scriptable at all
		try
			set this_file to item 1 of these_items
			tell application id "com.devon-technologies.thinkpro2"
				if not (exists current database) then error "Please open a database before using this script!"
				set theRecord to import this_file name "Print Job"
				if not (exists theRecord) then error "Import failed."
			end tell
		on error error_message number error_number
			if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
		end try
	end try
end open

Great! I use a little application (Formulate Pro) to annotate PDFs with digital pen input, e.g., signing and initialing contract provisions, etc. (An example of neat things I can do with my ModBook, a custom Mac tablet computer.)

I’ve been negotiating a series of renovation projects with my contractor. He sends me a proposed contract for a project, I mark it up with changes, fire it back by email and he sends me back the revised proposal. Inevitably, some projects get modified by mutual agreement in mid-course.

The revised script lets me print as PDF directly (instead of in two steps) from Formulate Pro to a DT Pro database. I’ve got a database of all my renovation projects, including notes, correspondence and contract development for each, scanned checks, etc.

When I bought my log cabin, I first had it inspected for any problems. Parts of it date back 109 years, other parts are less than 10 years old. My renovation projects have to deal with necessary maintenance as well as changes for my own convenience. When I bought the cabin, I made up a list of project goals and an estimated cost for them. My database helps me keep track of progress and is extremely useful for planning and budgeting. I’m pleased that the actual costs of projects to date have been less than my original projections, and that the results have exceeded my expectations. But there will continue to be ongoing projects, some unexpected.

Eric, next time you and the family visit we won’t run out of water (I had to call a water truck to fill the cistern). Getting hooked up to the county water system took a year and a half longer than my original projections, but cost substantially less. And now I have a dishwasher installed! :slight_smile:

The cabin is rustic, but it’s got a lot of style and it’s comfortable. Central heat and air conditioning. My favorite room has lots of glass on three sides, looking out at the woods and wildlife, and a huge amount of shelving for my books. The outdoors is wonderful. I built a stairway up the hill to the new gazebo in the woods, and often work in the gazebo. Life is great!

Do I owe all this to DEVONthink? No, but it’s a big help. :slight_smile:

In fact, before I went shopping for a cabin here, I had built a database of likely candidates, with pictures, prices and other information garnered from Internet real estate sites, and including the one that I bought. That advance preparation made my shopping trip more efficient and effective.