# Cannot highlights text in PDF that can only open read-only

**URL:** https://forum.collaboraonline.com/t/cannot-highlights-text-in-pdf-that-can-only-open-read-only/4895
**Category:** Development
**Created:** [July 23, 2026, 6:04pm UTC](https://forum.collaboraonline.com/t/cannot-highlights-text-in-pdf-that-can-only-open-read-only/4895 "2026-07-23T18:04:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gstlouis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/gstlouis/32/467_2.png) [@gstlouis](https://forum.collaboraonline.com/u/gstlouis)
#### Post date: [July 23, 2026, 6:04pm UTC](https://forum.collaboraonline.com/t/cannot-highlights-text-in-pdf-that-can-only-open-read-only/4895/1 "2026-07-23T18:04:01Z")

</div>

I am trying to confirm if it is still not possible for PDF to open so that we can highlight text in it. I have read some content with @darshan who confirmed there is read-only mode for pdf. I am wondering if this has improved or if there are any way we can highlight and ever search in PDF’s. This makes working with PDF file a lot easier.

I have done Tshooting below.

It might be related to this topic

> [@Unable to Edit Existing Content in Imported PDF Documents – Is This Expected Behavior or a Known Limitation?](https://forum.collaboraonline.com/t/unable-to-edit-existing-content-in-imported-pdf-documents-is-this-expected-behavior-or-a-known-limitation/4797):
>
> Hello Team, I am using Collabora CODE and have a question regarding PDF editing behavior. Environment: Product: Collabora CODE Version: 26.04.1.4.1 Deployment: Azure Container Application Hosting: Azure App Service When I upload/import a PDF document and open it in the Collabora editor, the existing PDF content appears to be rendered as images or graphical objects. I can: Add new pages Add new text Add new shapes and content However, I cannot modify the original con…

Some notes related troubleshooting with AI

**Collabora CODE 26.04.2.2 — PDF opens read-only, no annotation, but I found the cause**

Custom WOPI host (PHP). DOCX/XLSX/etc. open in edit fine with a full toolbar. PDFs opened read-only with no annotation tools.

**Setup:** CheckFileInfo returns `UserCanWrite: true`. My integration builds the iframe URL from the `text/plain` action’s `urlsrc` and appended `permission=edit` to it.

**What I tried:**

- Confirmed `UserCanWrite: true` — not the issue.
- Ruled out CSP (coolwsd’s default `style-src 'self'` — the inline-violation console warnings are harmless; DOCX edits fine with the same CSP).
- Checked discovery: PDF only has the `view_comment` action (no `edit`), as expected.

**The fix that worked:** removing `permission=edit` from the PDF’s `cool.html` URL. With it removed, the PDF opens in writable `view_comment` mode and comments/annotations work.

**My conclusion:** forcing `permission=edit` on a PDF (which only supports `view_comment`) drops it to plain read-only. Leaving permission unset + `UserCanWrite: true` correctly enters annotation mode.

**Question for the forum:** is this expected behavior — i.e. should hosts never pass `permission=edit` for PDFs and rely on `UserCanWrite` + the `view_comment` action instead? Or is `edit`-on-PDF silently falling back to read-only a bug?
