Problem
When ONLYOFFICE Docs is connected to an LMS (e.g. ILIAS) via WOPI, PDF files may still be opened and edited in the editor even after attempting to restrict them. The goal is to completely disable PDF viewing and editing on the ONLYOFFICE Docs side.
Environment
- Product: ONLYOFFICE Docs (self-hosted, deb/rpm or Docker)
- Integration: WOPI (e.g. ILIAS LMS)
Solution
Two steps are required. Both must be completed for the change to take effect.
Step 1 — Edit the document formats config on the ONLYOFFICE Docs server
Open the file:
/var/www/onlyoffice/documentserver/document-formats/onlyoffice-docs-formats.json
Locate the PDF entry:
{
"name": "pdf",
"type": "pdf",
"actions": ["view", "edit", "comment", "fill", "encrypt"],
...
}
Change the actions array to empty:
"actions": []
Restart Document Server services:
- deb/rpm installation:
systemctl restart ds-* - Docker installation (run inside the container):
supervisorctl restart all
Step 2 — Re-save the WOPI integration settings in the LMS
After restarting ONLYOFFICE Docs, go to the WOPI integration settings in your LMS (e.g. ILIAS) and click Save again — even if no settings were changed. This forces the LMS to re-fetch the WOPI discovery endpoint and pick up the updated format actions from ONLYOFFICE Docs.
Without this step, the LMS may continue serving PDF files to the editor based on a cached WOPI discovery response.
Result
After both steps, PDF files will no longer be opened or edited in ONLYOFFICE Docs from within the LMS.
Notes
- This change affects all file format actions for PDF globally on the Document Server.
- If you only want to restrict PDFs for a specific integration without affecting others, consider managing file type filtering on the LMS/connector side where possible.
- For Docker deployments, the config file is located inside the container. Use
docker execto access it, or mount it as a volume.
Comments
0 comments
Please sign in to leave a comment.