Disable attachments (PDF) inline preview

hello there!
I heavily use tables with PDFs attached directly in the cells. Having inline preview is a bummer for me in those cases.

Is there a way to disable inline preview on a note-by (even better, attachment-by) case?

thanks!

2 Likes

On an attachment by attachment basis use the following code wrapped around the pdf -

<details close>
<summary>Show pdf ...</summary>

[pdf here]

</details>

HTH

4 Likes

wow! great. thanks a lot.
next -- it would be great to be able to do it for an entire note too.

That's a nice solution. I wonder if we should have this by default.

2 Likes

I think a menu item toggle like Show note counts would be great for Show PDF preview.

2 Likes

Thank you very much for the feedback. I thought about this, and I think that the best default behavior is inline preview ON (as it is at present) -- but a menu item toggle at three levels (1: global, 2: by note, 3: by attachment) would be EXTREMELY useful.

1 Like

Edit I was mistaken see the response

I recently update to the latest joplin appimage (2.1.8) from an ancient version (1.4.19).

I've been extremely disheartened to discover forced previews of all PDF's with no option to turn them off. While an optional "generate hover preview on link hover" is something I would certainly find useful, the current behaviour is extremely intrusive and breaks the various tables I've built with stored PDF's for reference/archiving. Furthermore, it seems to regenerate the previews on every change, which is also a very poor behaviour.

I have tried the plugin here GitHub - JJ-8/joplin-disable-pdf: Disables the PDF preview (and export) in Joplin for better performance, but currently all that seems to do is disables the preview window. To be perfectly honest, it's PDF previews that should be the plugin, not the method to disable them.

The "<details close>" hack for working around this also isn't viable, as it doesn't work in tables. I also doubt it's ability to prevent regenerating the previews constantly.

Are there any plans to implement a method to turn this off? Joplin has been overwhelmingly my favorite editor so far, but this is going to force me to either stick with an old version or move to another markdown editor.

In Config => Markdown, you can turn it off.

4 Likes

Thank you so much! I had completely missed it the first time around, and this thread had me believe there was no other way to deal with the issue.

For others the full path is: Tools->Options->Markdown->Enable PDF viewer (uncheck)

4 Likes

When I insert the

tags, I get this expand arrow showing a textual help, but when I click the arrow, the span only expands the joplin link to be visible, not the previewer. Strange

Are you trying to replicate what I mentioned? To be more clear, here's what I found in my testing (note that you can/must escape tags and special characters by placing "\" in front.

The following:

<details close><summary>DataSheet_S8030.pdf</summary>

[DataSheet_S8030.pdf](:/6b2ed1ce6a60435bb295b688047de174)

</details>

Results in a full preview when opened

Whereas the following missing the new line between </summary> and the link:

<details close><summary>DataSheet_S8030.pdf</summary>
[DataSheet_S8030.pdf](:/6b2ed1ce6a60435bb295b688047de174)

</details>

Results in only the following displaying when opened

[DataSheet_S8030.pdf](:/6b2ed1ce6a60435bb295b688047de174)

edit Screenshot

Not sure why that happens. Is this a bug I should make a new thread on or report as an issue on github?

2 Likes

It was the linefeed. Thank you.

A little late to the party, but just wanted to note something for people that might find this thread in the future that only want to disable it for a singular note, in the sense that the preview in the preview pane is hidden. Should that be what you want to do, the code below works per the date this is posted. Just inspect (Help → Toggle development tools) the PDF preview element to see if the classes have changed if it doesn't work in the future. Otherwise, use Nix's solution.

<style>
	.media-pdf {
		display: none;
	}
</style>