modify 'Save to DEVONthink Pro' to set file name

First I need to say that I am totally new to the DTPO software (and to scripting too!), but after the first days of exploring I must say, that this looks like a totally great piece of software! I know that I have to read and learn a lot, but I also want to learn by using DTPO from day one.

The most important thing to me is, to save web pages and articles as PDF. I have done this for years with my favorite browser Camino and the ‘print to pdf’ command. As standard the PDFs are named with the browsers window name and I manualy put a date (yymmdd) in front to have some kind of sorting in the various folders these PDFs are saved to.

Now with DTPO and the ‘Save to DEVONthink Pro’ command used from Camino I can do the same, which is great, but with one exception: The name of the pdf inside DTPO is the browsers window name (which is good), but when I open the pdf with an external application, eg. Preview, the file is named ‘PrintJob-1.pdf’! This is very bad because I need those PDFs as separate files sometimes.

I am pretty sure that the ‘Save to…’ script can be altered to use the browsers window name as original file name, but sadly I don’t know how.

To have the date in front of the name is not necessary for the use inside of DTPO, but for the original file name saved to disk, this would be my 200% solution (but probably the next goal!)

Any hint to change the script to set the file name to something other than ‘PrintJob-x.pdf’ is greatly appreciated.

Many thanks in advance from newbee Frank

Hi, Frank. Caution: Don’t change the name of the PDF file that’s stored inside your database package file. Doing that would break the database’s Path pointer to it. Yes, you could write a bit more complex script that would also change the file name in the Path, but if so make sure that script works perfectly every time! (A backup copy of the database package file should be made before experimenting!)

If you wish to send a copy of your PDF file to a colleague, exporting the PDF from your database to the Finder by using File > Export > Files & Folders to a folder in the Finder will save the file with the same name you had assigned to it in the database. Now, in the Finder, you can manually strip out the beginning date code in the file name, or write a script to do that for batches.

Remember, though, that if you simply drag a file(s) from the database to the Finder, the filename(s) of the file(s) will be the original, not the Name(s) you had assigned in the database.