Description
We have an rocket.chat installation and I’ve read several times, that there should be a preview or direct “open” for PDF-Files. f.e.: [3.6.0] Does not render pdf previews · Issue #18740 · RocketChat/Rocket.Chat · GitHub
At our system there is nothing like this. We can only download the pdf (by pressing on the filename or the download-icon). Can I activate the preveiw somewhere?
Server Setup Information
Version of Rocket.Chat Server: 3.13.2
Operating System: Ubuntuu
Deployment Method: snap
Windows-Client: 3.2.2
Any additional Information
OK - I had to go read why this happens and the answer is here:
## `registerFieldTemplate` is deprecated
hmm it's true :(, we don't encourage this type of customization anymore, it ends up opening some security holes, we prefer the use of UIKit. If you feel any difficulty let us know
## `attachment.actions` is deprecated
same reason above
## `attachment PDF preview` is no longer being rendered
it is temporarily disabled, nowadays is huge effort render the previews and requires the download of the entire file on the client. We are working to improve this :)
Some PRs that point to it.
RocketChat:develop
← RocketChat:fix-pdf-safari
opened 05:21PM - 19 Oct 18 UTC
RocketChat:develop
← RocketChat:fix/pdf-preview-condition
opened 04:51PM - 15 Nov 18 UTC
Based on the comment https://github.com/RocketChat/Rocket.Chat/pull/10519#issuec… omment-439094206.
Essentially it would be OK if you limited it to say 1Mb PDFs, but people want a 50mb PDF preview and that grinds the system to a halt.
So to keep performance under control it is disabled at least for now.
Thank you the information. Is there another way to optimize the way of opening the PDFs? Currently they have to be downloaded to a folder and than you have to open them from there. Isn’t there a way that PDF-files are opening instant?
Possibly - it probably needs a different link to open in application rather than download?
This is the html for the download link that I copied from open.rocket.chat for a test pdf I uploaded in the #sandbox channel.
You might want to take a look at it.
<div class="rcx-box rcx-box--full rcx-message-attachment rcx-css-1qrnje"><a href="https://open.rocket.chat/file-upload/uMaFb7Qm3aSeqojPA/drawing.pdf?download" target="_blank" download="drawing.pdf" rel="noopener noreferrer" class="rcx-box rcx-box--full rcx-css-1rdemzp">drawing.pdf</a><a target="_blank" href="https://open.rocket.chat/file-upload/uMaFb7Qm3aSeqojPA/drawing.pdf?download" download="drawing.pdf" class="rcx-box rcx-box--full rcx-box--animated rcx-button--mini-square rcx-button--square rcx-button--ghost rcx-button rcx-css-1k1r0f9" data-title="Download"><i aria-hidden="true" class="rcx-box rcx-box--full rcx-icon--name-download rcx-icon rcx-css-1g87xs3"></i></a></div>
Anything new about pdf view inside RocketChat? Is there any way to enable it? We are missing that feature