Custom PDF Template

Hi!

I’m using OTG v3.1.2, I noticed that there it’s possible to create resources from a PDF, but I was wondering if it’s possible to create a custom template?

My use-case is dive planning, and would like to be able to create my plan and then populate it with data after the dive.

Thanks!

1 Like

Welcome @ethankhall

Creating your own templates for use in the New Document Assistant isn’t possible at this time.

You’d like to populate it how? With an Apple Pencil?

Alrighty thanks! Yes, I would be using the Apple Pencil. The workflow that I’m typing to do wouldn’t work, we have to draw a sketch.

I think I could setup a “template” in the DB, then copy it for every use.

You could also create a shortcut that does this for you and optionally add meta-data or create a new title every time you use it. This takes some time once, but might save you much time in the future.

1 Setup two group called ‘Diving Templates’ and ‘Diving Logs’
2 Copy the empty template PDF to the ‘Diving Templates’ group (assuming you use a PDF)
3 Copy the UUID of that template (long press, choose item-link)

4 Open Shortcuts
5 Create a new Shortcut called ‘Create Dive Log’ (or whatever you prefer)
6 Add the ‘Get Item’ action of DTTG
7 Paste the UUID (you’ll see x-devonthink-item:// followed by a long number)
8 Press ‘>’ and turn off ‘Show while running’
9 Add the ‘Get content of item’ action of DTTG
10 Press ‘>’ and turn off ‘Show while running’
11 Add the ‘Create item’ action
12 In the ‘Create item’ action choose:
a. file
b. the default name like ‘Dive log’ a space and the current date variable
c. the default group ‘Diving Logs’ you created earlier
d. press the ‘>’
e. click the ‘file’ row, choose ‘Magic variable’, choose the output of step 9

13 Optionally add all kind of other meta-data like tags, labels and whether or not the new file should be unread etc.

14 Optionally click ‘…’ at the Shortcut title and add the shortcut to the home screen

And of course you can extend the shortcut and create menu items to choose from different dive log types, add dialogs to add the location or diving partners or whatever you want added to the shortcut.

Happy diving!

2 Likes

Awesome, that worked great thanks! I definitely need to dive into Shortcuts more!