Page numbering

Is there a way to number all the pages in a database? As in I’ve got a lot of PDFs, web pages, RTFs, and want to have a global numbering scheme for them?

DEVONthink already assigns a unique identifier to every item in a database, and that identifier can be used to link to an item. For example, if a document is selected, ‘Edit > Copy Item Link’ can be used to copy that unique identifier to the clipboard. If you then paste the Item Link into a rich text document, a hyperlink consisting of the text of the document Name will be created.

How would you use a sequential number assigned to every item in a database? If you open the History view (Tools > History) a flat file list of every item in the database is presented. This list can be sorted in a number of ways, including date added, created or modified, Kind, word count, Size, Location, Label, etc. Use the menubar command ‘View > Columns > ….’ to add a sortable column for such sorts. Or you could create a smart group that would display a flat file view of every document or every group in the database. A smart group to display all documents would list the total number of documents.


Thanks for your reply. My goal isn’t to number each item in the database, but every page. Ie, if my database contains 200 PDFs, each of which has 30 pages, I’d want to number each page from 1 to 6000 Is this doable?

Sorry, I misinterpreted your question.

I don’t believe it would be possible to create such page numbers in the image layer of the PDFs using scripting within DEVONthink. You could do that manually in Acrobat, but that would be drudgery - unless Acrobat provides an automate means of doing that. You might check out other viewers and PDF utility apps for the possibility.

A group of PDFs can be opened (individually) in Acrobat and Bates numbered (Acrobat > Advanced > Document Processing > Bates Numbering > Add) “Bates numbering” is automation that adds sequential numbers to each page of each open document - usually padded with zeros - 000001, 000002, etc. (The term comes from an manual numbering machine that was common in offices not too many decades ago.)

The number is embedded in the text layer of the document, and can only be removed or edited manually. PDFPenPro provides a similar Bates numbering feature – which includes a script that could easily be modified to work with DEVONthink and PDFPenPro. Again, once the number is embedded in the text layer of a PDF it cannot be accessed programatically and requires manual page-by-page editing to emend.

However, IMO, even though theoretically scriptable, if you did this to every document in your database, you’d have a hash in a moment. The next document added, or moved, etc., would make the whole scheme invalid.

Thanks guys. Yeah, I didn’t think it would be possible, but would be useful in order to be able to quickly reference things—the key would’ve been to do it in devonthink, because the files wouldn’t be just PDFs, but a mix of PDFs, RTF, web archives, etc. oh well–will do without it!

It’s possible to get an x-devonthink-item:// link to specific pages of a PDF, or to the PDF overall, or to any other document in your database. Check the manual and Help.