For IT: Shared Computers and Policies

This chapter is for the people who install and look after PlanetPDF for others: on office PCs, and on computers many people sign in to at once, such as terminal servers (Remote Desktop, Citrix). It covers installing without questions, deciding settings for everyone with a policy file, updates on computers where users can't install anything, and what PlanetPDF keeps where.

Installing for everyone

The Windows installer installs PlanetPDF once for everyone who uses the computer, and needs an administrator. To install with no windows and no questions, run it with these switches from a command prompt or your deployment tool:

PlanetPDF-Setup.exe /VERYSILENT /SUPPRESSMSGBOXES

Setup leaves out the natural reading voices unless you ask for them: add /COMPONENTS="main,printer,voices" to download them during setup (436 MB from software.planet.net, checked against the checksum built into Setup), or install them afterwards from a copy you keep, with no internet needed: PlanetPDF-Voices-Setup.exe /VERYSILENT /SUPPRESSMSGBOXES (download it from the PlanetPDF page on software.planet.net). /COMPONENTS="main" leaves out the PlanetPDF printer. /DIR="D:\Apps\PlanetPDF" chooses another folder. A silent install doesn't ask which app opens PDF files; set that with your default-apps policy.

Setup's exit code is 0 when everything asked for was installed, and 10 when PlanetPDF was installed but the PlanetPDF printer couldn't be added (for example, another program holds the printer's connection). The reason is in Setup's log (/LOG="C:\path\setup.log") and in printer\planetpdf-printer-setup.exe status.

Each person who signs in gets a PlanetPDF of their own: their own window, settings, signatures, and stamps. On a terminal server, people working at the same time never share one.

The natural voices go into PlanetPDF's folder, one copy for everyone. On a terminal server, install them that way if people will use Read Out Loud: over Remote Desktop PlanetPDF doesn't offer anyone a download of their own (354 MB each), only the page with the voices' installer. Each person reading aloud with the most natural voice (Kokoro) uses about 300 MB of memory while it reads; Piper's voices and the Windows voices use much less.

The install folder is protected

Setup lets only administrators and Windows itself change PlanetPDF's folder, wherever you put it; everyone else can read and run what is in it. This matters most on shared computers: the launcher there is run by everyone, and the PlanetPDF printer's service runs with system rights, so nobody but an administrator may be able to replace them.

A folder others could change. A folder that other users could write to at any time (installed by version 1.0.6 or older outside Program Files, or a folder that existed before) can't be trusted just by closing it: what someone put there while it was open, a program or a library in place of PlanetPDF's, would still be there. So:

Deciding settings for everyone: the policy file

By default each person chooses their own settings in Preferences. With a policy file you decide some of them once for everyone who uses the computer, and turn off features you don't want used there. The file is plain text named policy.json:

An example that stops PlanetPDF from checking for updates by itself, checks signers' certificates online, and turns off plugins and web pages as PDFs:

{
  "settings": {"check_updates_on_start": false, "update_every_days": 0, "check_revocation": true},
  "off": ["plugins", "web_capture"]
}

PlanetPDF reads the file each time it starts. People see the settings you set in Preferences, grayed, with the note that their administrator set them; a feature you turned off says so when someone chooses it. What a person had chosen themselves is kept and comes back if you take the policy away.

Settings a policy can set

Under "settings", give each name the value everyone gets. true and false are written without quotes; numbers too; text goes in quotes.

NameWhat it setsValue
check_updates_on_startCheck for updates soon after PlanetPDF startstrue or false
update_every_daysCheck for updates every this many days while PlanetPDF runsA number; 0 = never
api_enabledThe local API for other programs and pluginstrue or false
check_revocationAsk certificate authorities online whether a signer's certificate was revokedtrue or false
trust_windows_rootsAlso trust the certificates Windows (or macOS) trusts when checking signaturestrue or false
timestamp_urlThe timestamp server for digital signaturesAn address in quotes; "" = none
remember_textRemember text people add and suggest it as they typetrue or false
remember_private_numbersAlso remember text with Social Security, card, or account numberstrue or false
autosave_minutesMinutes between recovery copies of unsaved workA number; 0 = off
company_nameThe company name on stampsText in quotes
print_folderThe folder printouts from the PlanetPDF printer are saved in without askingA folder in quotes (write each \ twice); "" = ask
print_name_templateThe name printouts getFor example "{document} {date}"

Features a policy can turn off

Under "off", list the features nobody on the computer gets:

NameWhat is turned off
updatesChecking for updates and installing them from inside PlanetPDF. Help ▸ Check for Updates then says that updates are handled by the administrator. Your own unattended update (below) still works.
pluginsPlugins: none can be turned on, and none runs.
web_captureMaking a PDF from a web page (which starts Microsoft Edge or Chrome and goes online).
office_conversionStarting Word, Excel, or PowerPoint to turn their files into PDFs, and saving as Word 97-2003.
ai_readerAI text reading for exports.
voice_downloadDownloading the natural reading voices from inside PlanetPDF, and its offer to open the page with their installer (install them with PlanetPDF-Voices-Setup.exe instead).

To turn the local API off for everyone, set "api_enabled": false under "settings"; plugins need it, so they are off then too, and planetpdf serve refuses to start.

Checking that your policy is in force

In a command prompt, type:

planetpdf policy

It shows the file PlanetPDF looks for, the settings and features it took from it, and anything it didn't take, with the reason: a name it doesn't know, or a value of the wrong kind (a number in quotes, for example). planetpdf policy --json gives the same for scripts. The exit code is 4 when something in the file wasn't taken, and 0 otherwise.

Only an administrator's file counts. A policy can also allow things, so PlanetPDF ignores a policy file that anyone but an administrator could have written or could change, and planetpdf policy says so. On Windows, the file and its folder must be writable only by administrators and SYSTEM, which Setup arranges for the install folder; create the file from an administrator command prompt or your deployment tool. On a Mac and Linux, the file and its folder must belong to root and not be writable by others.

Note: a policy is for managing a shared computer, not a lock on the person: someone who can run a copy of PlanetPDF of their own isn't held by it.

Updates where users can't install them

Installing an update needs an administrator. A person without administrator rights is told once that a new version is out; PlanetPDF doesn't download it for them. You have three ways to handle updates on such computers:

A file named update.json beside PlanetPDF.exe changes how PlanetPDF checks, for everyone on the computer:

Each version is installed in a folder of its own inside the install folder, so people still working in the old version aren't disturbed; old versions are removed once nobody uses them.

Environment variables

Set these for the whole computer (system variables) or for a person. A setting the policy file decides wins over a variable: a person's own PLANETPDF_PRINT_FOLDER doesn't change where printouts go when the policy sets print_folder, and PLANETPDF_UPDATE_URL doesn't make PlanetPDF check for updates when the policy turns updates off (IT's own --install-updates still uses it). planetpdf signatures follows the policy's check_revocation as the window does.

VariableWhat it does
PLANETPDF_PROFILE_DIRPuts each person's profile folder (settings, signatures, stamps) somewhere else, for example on a home drive: H:\PlanetPDF.
PLANETPDF_PRINT_FOLDER, PLANETPDF_PRINT_NAMEThe folder and name for printouts from the PlanetPDF printer when the person hasn't chosen their own (see Printing).
PLANETPDF_PLUGINSFolders with plugins offered to everyone (each person still turns a plugin on themselves).
PLANETPDF_UPDATE_URLThe address updates come from; set but empty, PlanetPDF doesn't check.

What PlanetPDF keeps, and where

WhereWhat
The install folder (C:\Program Files\PlanetPDF)The program, one folder per version; the PlanetPDF printer's service; policy.json and update.json if you made them. Changed only by administrators.
Each person's roaming profile (%APPDATA%\Planet Networks\PlanetPDF)Their settings, saved signatures and initials, stamps, trusted certificates, plugins, word lists, remembered text, and logs. It follows them between computers. Saved signatures are ordinary picture files there, so protect the share your roaming or redirected profiles live on as you would any folder of personal papers.
Each person's local app data (%LOCALAPPDATA%\Planet Networks\PlanetPDF)What belongs to this computer: recovery copies of unsaved work, downloaded updates and voices, printouts waiting to be saved, and the small files a running PlanetPDF uses to find its other windows.
%ProgramData%\PlanetPDF\SpoolThe printer service's working folder and log. Administrators and SYSTEM only. If someone else made that folder first and it can't be moved aside, the service uses %ProgramData%\PlanetPDF-Spool-… instead (Windows' Application event log and planetpdf-printer-setup.exe status say which).

What people on a shared computer can't do to each other

The names of documents waiting at the PlanetPDF printer can be seen in its queue by everyone on the computer, as with any shared Windows printer. If that matters, restrict the printer's permissions (Printer properties ▸ Security) so people manage only their own documents.

Checking an installation