Screenshots
About this app
Opens a PDF shared in a Matrix room and renders it in place, so the document and the conversation about it stay on screen together. Pages are rasterised with PDF.js — a PDF can carry JavaScript, a canvas cannot, so nothing in the document ever executes.
Pinned in a room it lists the PDFs shared there, newest first, and opens the one you pick. You can draw on a document, add a drawn signature, and send the result back to the room as a new attachment — the original stays where it is. A signature here is a picture of a signature: it is placed into the page itself so every reader sees it, but it carries no certificate and proves nothing cryptographically.
It reads end-to-end encrypted attachments, which no other widget does.
A widget asking the client for room media over MSC4039 gets back whatever the
media repository serves, and in an encrypted room that is ciphertext it has no
key for. Instead of asking clients to decrypt on a widget's behalf, the host
passes the event's EncryptedFile object — key, IV and SHA-256 — in the
URL fragment, which browsers never send to the server hosting the widget.
The widget verifies the hash, then decrypts with WebCrypto AES-CTR itself.
Opened that way — one document handed over by a host — it learns exactly one file key for one attachment, never a room key. Pinned as a room widget it needs more: listing the room's PDFs means reading its file messages, and in an encrypted room those carry the key of every PDF in the list, opened or not. That is the price of the list, and the permissions below say so. Permission to write is asked for separately, at the moment you press Save. No change to the Matrix client is needed for any of this.
Zoom, fit-to-width, lazy page rendering, light and dark themes, and password-protected PDFs. CMaps and standard fonts are built in, so it works in air-gapped deployments with no CDN.
The origin serving this widget sees the documents you open in it. That is a smaller trust boundary than a client-side plugin with full DOM access, but it is not nothing — host it yourself, and never on the same origin as your Matrix client, or the iframe sandbox stops meaning anything.
Add to a room
Paste this into any room you may configure — Element and most clients understand /addwidget:
/addwidget https://marcade.store/apps/de.minagawa.pdf-viewer/0.3.1/
Pin it with a plain /addwidget and it lists the room's PDFs. A host may also open one document directly with `?mxc=`, and `?url=` shows any HTTPS PDF without a room at all.
Rooms should pin the versioned URL above. https://marcade.store/apps/de.minagawa.pdf-viewer/latest/ always points at the newest release.
Name and icon in Element
/addwidget can carry only the URL: Element lists the app as “Custom” without an icon. Add the Marcade Store once per room and it gives every Marcade app pasted in there its name and icon, and tells you when an update is out.
/addwidget https://marcade.store/apps/de.minagawa.marcade-store/0.1.4/
Permissions
Capabilities this widget may request. The Marcade Player asks for your consent before granting any of them.
- Requires running inside a Matrix client
io.element.requires_client - Download files and media through the client (e.g. images, avatars)
org.matrix.msc4039.download_file - Read messages in the room (type m.file)
org.matrix.msc2762.receive.event:m.room.message#m.file - Upload files through the client
org.matrix.msc4039.upload_file - Send messages to the room (type m.file)
org.matrix.msc2762.send.event:m.room.message#m.file
What's new in 0.3.1
Added: type text onto a page, next to Draw and Sign. Pinned with a plain /addwidget, the widget now names itself and sets its own icon; the icon can be changed from the ⋯ menu instead of a built-in image. Changed: the licence is now declared as AGPL-3.0-only in the package as well.
Information
- Version
- 0.3.1
- Section
- Unverified — Listed only. Marcade builds and hosts nothing; the link goes to the author’s own deployment.
- License
- AGPL-3.0-only
- Author
- Yan Minagawa
- Source code
- https://code.fe80.eu/dtn10/pdf-viewer-widget
- Encrypted rooms
- Supported
- Widget ID
de.minagawa.pdf-viewer