PDFs shared via public read-only links don’t display when secure view + watermark is enabled
Bug description PDF files shared via public read-only links are not displayed. The standard PDF reader (not Nextcloud Office in read-only view) displays a blank page (and a page count of 0/0) when secure display + watermark is enabled.
To reproduce the bug Steps to reproduce the behavior:
- Create a public read-only share for a PDF file and apply a “confidential” tag to the file.
- In the Nextcloud Office admin settings, enable secure display with watermark (enter what you what in the watermark text field ; in my case for sample screenshots : "test"). This display must be triggered by the “confidential” tag (you can also check the option to enable secure display for external read-only shares).
- Test the public share URL you created and note that the PDF does not display correctly (blank page and number of pages 0/0, in the standard PDF reader).
- Then go to the sharing settings and check the “Hide download” option... and it finally works, in Nextcloud Office with read-only view and watermark
There is a solution in point 4... except that it's not practical and it's a safe bet that many people share files of this nature:
- without knowing that they don't work properly
- without understanding or knowing that they need to hide the download (and those who do understand will inevitably make the mistake at some point)
Then, I don't have a real solution in mind... because there are several things to consider in terms of technology and usability. In any case, things need to be made clearer to prevent people from falling into this trap, or if it's a “simple” goal, it needs to be corrected.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
When the “Hide download” option is not checked, the document opens incorrectly in the standard PDF viewer :
When the “Hide download” option is checked, the document opens correctly in Nextcloud Office with read-only view :
Client details:
- Browser Firefox and Ungoogled Chromium
- Device: Ubuntu 22.04 (Gnome)
Server details
Operating system: Linux
Web server: nginx
Database: mariadb
PHP version: 8.2/ 8.3
Nextcloud version:
COOLWSD version: 25.04.5.5(git hash: dfe56def27) LOKit version: Collabora Office 25.04.5.3(git hash: 0004188293) Served by: Rocky Linux 9.5 (Blue Onyx) Server ID: 7c635b80 WOPI host: nextcloud 31.0.10.2 - richdocuments 8.7.6
COOLWSD version: 25.04.5.4(git hash: be0b3cc3ef (E)) LOKit version: Collabora Office 25.04.5.3(git hash: 0004188293) Served by: Ubuntu 22.04.5 LTS Server ID: 324d64df WOPI host: nextcloud 31.0.8.1 - richdocuments 8.7.6
Can be provided if necessary
Logs
Nextcloud log (data/nextcloud.log)
Can be provided if necessary
Browser log
Can be provided if necessary
On Collabora we checked this issue and we could reproduce it.
We checked, and this is not related to Collabora Online.
NC version 28 with Rich documents 8.3.13 was ok. NC version 31 with Rich documents 8.7.6 was NOT OK
Let me add @juliusknorr here.
@juliusknorr could you please see the report? Thank you,
Hello @annanazarayan @juliusknorr, any news ? Thanks by advance.