Discourse에서 PDF를 인라인으로 보내기


Features

Uploaded PDFs are opened with “content disposition inline”, which allows them to be displayed in the browser instead of being offered for download.

Configuration

Not necessary.

5개의 좋아요

How is this different / better than the existing Theme Component to do the same?

1개의 좋아요

The plugin directly opens the PDF in the browser, not in an embedded element inside a post :slight_smile:

This was a feature request: Add configuration option to serve local PDF uploads inline

2개의 좋아요

Does local mean S3 and similar plus CDN will fail when using this plugin?

It does not alter the way, S3 serves PDFs.
Side effects would be magic.

4개의 좋아요

Is this plugin still in a working condition?

We are still using it.

2개의 좋아요

Unfortunately, it’s broken currently.
I have to investigate.

2개의 좋아요

Maybe I’m naive, but I think most people would want PDFs to render in the browser by default.

@thoka, is there any reason you opted to publish a plugin for this functionality rather than trying to upstream it into Discourse?

I found time to test it.
The plugin is working as expected.
I do not understand, what might have caused problems in the meantime.

I wrote the plugin, since there were no responses to my feature request.

When thinking about drawbacks of sending PDFs to the browser directly, I envision the following potential issues:

When utilizing Discourse as a Progressive Web App on a mobile device, one inevitably exits the Discourse interface, or rather its user interface, to display the PDF, thereby relying on the user’s familiarity with navigating back to the original application.

Furthermore, when it comes to mobile devices, one is at the mercy of how the browser handles inline PDFs. While Firefox currently displays the file directly, it appears that there is no way to persuade Chrome to do so:

1개의 좋아요

Not needed anymore! :partying_face:

4개의 좋아요