Make PDF previews actually readable

Hi! :blob-wave-reverse:

I use this neat component quite often, at least once a week.

The main issue is that the embedded PDFs are most of the time unreadable by defaut because the preview size is so small.

Default:

After toggling off the page previews and clicking twice the “fit” button (that’s a lot of clicks):

Sure, it’s better, but still hardly readable. The height is so small (hardcoded at 500px but overridable), and the width isn’t the best too.

I get the component is called “PDF Previews” yet, I’d like to be quickly able to actually read the PDF in good conditions.

I can click the link, but it will download the PDF, so it’s not what I’m looking for.

Currently the only way to quickly display the PDF in a readable state is clicking the print icon, which is not really intuitive:

Is it possible to simply have a “fullscreen” toggle to display the PDF preview in a larger popup, the same way it exists for tables and codeblocks?

I’d be so happy to see such a QoL change in this component. :hugs:

5 Likes

Uh. After searching for a bit on meta, I notice it shouldn’t:

Clicking the link opens the PDF but on my instance, it downloads them. I don’t know why.

1 Like

I think there was a fix recently

1 Like

Thank you for this information, I wasn’t aware of it. I updated, but my PDFs are still forcibly downloaded on click. :person_shrugging:

Whether they are opened or downloaded on click, the requested feature stays anyway: I’d like to be able to properly preview my PDFs in the context of a Discourse post. :smile:

The fix in that other topic isn’t merged yet, so that’ll be why :sweat_smile:

I reopened it for clarity

2 Likes

My expectation that the PR had been merged and this was fixed was based on the fixed tag, not the fact that the topic was closed. I think the topic was also closed again before the fix was merged :woman_shrugging:

@Canapin it’s merged, so you might want to try.

2 Likes