Skip to content

Documents: create Google Docs from templates and export PDFs

Describes Document Creator 0.10.0.

The Documents page lists every document Document Creator manages in Google Drive. From here you create a document, blank or from a template, open it in Google Docs, download it as a PDF and delete or restore it.

Where to find it

In the admin sidebar, open Document Creator. It opens on Documents, the first of its three pages (Documents, Templates, Categories). The address is /admin/document-creator/documents.

You need the Document Creator permission. A Google account must be connected on the module’s settings page; until then the page shows Google Account Not Connected instead of the list (see the settings guide).

The Document Creator documents page saying Google Account Not Connected, with Go to Settings The Document Creator documents page saying Google Account Not Connected, with Go to Settings

Without a Google account, the documents page asks you to connect one.

The list

Each document appears as a card with a preview of its first page, or as a table row if you switch views. The two buttons at the right of the toolbar switch between cards and a list. In the list, click Name, Status, Created or Modified to sort by that column; click again to reverse it. Twenty documents fit on a page.

Clicking a document’s name or preview opens it in Google Docs in a new tab. Under the name, a card shows when it was last Updated: and when it was Created:.

Two badges flag documents that need attention:

  • lost: the file is no longer found in Google Drive.
  • unfiled: the file is in Drive, but outside the Document Creator folders. Click the badge to resolve it (see below).

The list is kept in step with Drive. It is refreshed when the page opens, every two minutes while it is open, and when you come back to the browser tab, for example after editing in Google Docs. The circular arrow button at the top refreshes it on demand.

Header buttons

  • The circular arrow: Refresh, re-reads the folders from Google Drive.
  • Open Folder: opens the documents folder in Google Drive in a new tab.
  • New Document: opens the dialog for creating a document.

On a phone these three are in the ⋮ menu.

Filtering and searching

  • Search by name…: shows documents whose name contains the text.
  • All Categories: only documents in one category.
  • All Types: only documents of one type. With no category chosen, each type is shown with its category in front of it. Changing the category clears the type.
  • All Statuses, Published, Lost, Unfiled.

On a phone, the filters are behind the Filters button.

Setting a document’s category and type

On each document, a drop-down sets its category, starting from No category. Once a category is set, a second drop-down sets the type, starting from No type. The change is saved as soon as you pick. A document has at most one category and one type. If its category or type has been deleted, the drop-down says — deleted category — or (deleted type).

Categories and types are set up on the Categories page.

Creating a document

New Document opens Create New Document:

  • Blank Document creates an empty Google Doc named “Untitled Document” in the documents folder and opens it in Google Docs in a new tab.
  • Under or from template, each template is shown as a small preview. Click one to use it.

If the template has no variables, the document is created right away, named after the template, and opened in Google Docs.

If it has variables, the dialog moves to Fill Template Variables:

  • Document Name: starts as the template’s name.
  • One field per variable, labeled with the variable’s name in plain words (client_name becomes “Client Name”). A variable whose name contains “description” or “notes” gets a multi-line box.
  • An image variable has Choose image (one picture) and a list of images has Choose images. They open the media library, and come back to the dialog with selected or the number of images chosen.
  • Image variables also show their layout settings: Default width (px) and Include annotations; a list of images adds Separator (New line, Space, None), Columns (1 to 4), Image size (Fit width or Fit page) and Max images (blank = unlimited). These settings belong to the template: they are saved as you change them and apply to later documents made from it too.

Create Document copies the template into the documents folder, replaces each variable with what you typed, puts in the chosen images and opens the new document in Google Docs. The arrow at the top goes back to the template choice.

A document’s actions

The Actions menu on each card or row holds:

  • Edit: opens the document in Google Docs.
  • Export PDF: downloads the document as a PDF, named after the document in lowercase with hyphens. A PDF larger than about 5 MB can’t be downloaded this way; the page says so and asks you to export from Google Docs instead.
  • Refresh thumbnail: fetches a new preview from Google Drive.
  • Delete: moves the document to the deleted folder in Drive. It asks for no confirmation, and nothing is lost: the document can be restored.

The Trash

Once something has been deleted, Active and Trash tabs appear above the list. They are hidden while the trash is empty. In Trash, each document shows when it was deleted and by whom, its category and type as read-only badges, and an Actions menu with View, Export PDF, Refresh thumbnail and Restore. Restore moves the file back to the documents folder.

If a deleted document’s file no longer exists in Drive, restoring it fails with a warning.

Resolving an unfiled document

Clicking an unfiled badge opens Resolve Unfiled Item. It shows where the file is now, under Saved location:, and offers:

  • Set This As Correct Location: keep the file where it is and treat that place as its home.
  • Move To Documents: move the file into the documents folder.
  • Move To Templates: move it into the templates folder, which turns it into a template.

Documents in projects

When the Projects module is installed and a project turns on the Documents tab, that tab lists the documents linked to the project, each with Edit in Google Docs. People who can edit the project can link an unlinked document with Attach an existing document and Attach, and unlink one with Detach, after confirming. A document belongs to one project at most. Open Document Creator goes to the Documents page.

What it doesn’t do

  • Documents are edited in Google Docs, not inside PhoenixKit.
  • There is no way to delete a document for good from this page. Delete always moves it to the deleted folder.
  • A document from a template is a copy. Later changes to the template don’t change documents already made from it.