Disabling PDF viewer in public mode

The PDF viewer is currently not able to correctly load a file through
the public API, so disabling it for now in that mode.

Backport of 76876042ee0a6340332276e31e418ae2436731ad