PDF Viewer selectively turned on and off per note

Joplin 2.14.19 (prod, linux)

Client ID: 9959465eea794e60b1b95760c308ca91
Sync Version: 3
Profile Version: 46
Keychain Supported: No

Revision: 971c4e5

I want to be able to have the PDF Viewer function for most notes, but not for all notes. Is this possible? And if not, can we make it possible?

For example, I have a note named "resumes" (as in résumés). It contains links to a markdown version, a .docx version, and a PDF version of my resume. I don't want it to render the PDF in the renderer frame. But I want other notes with links to PDFs to render. And I have a some notes that contains a lot of information where only one bit is a link to a PDF. I don't those to render the PDF viewer either.

Thoughts?
Thanks. -t

It should be possible to hide the PDF viewer with CSS for just that note. For example, by adding the following to the end:

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

Works. Sure. But … ew. #kludge

The easiest option...

would be to render the PDF as an image by preceding with an exclamation !, which will display a missing image icon and the link text instead of the PDF viewer (but it won't be clickable):

![resumes.pdf](:/9959465eea794e60b1b95760c308ca91)

As an alternative to the previous suggestion...

you could add a title to the PDF you don't want to render, then use that title in the previously mentioned css to only target specific links:

[resumes.pdf](:/9959465eea794e60b1b95760c308ca91 "hidePDFViewer")
<style>
	a[title="hidePDFViewer"] .media-player.media-pdf {
		display: none;
	}
</style>

(warning: this method was not tested by me)

1 Like

I am here as I am fed up with scrolling behaviour up and down a note with the PDF Viewer activated

Scrolling down the editor pane is non-linear with the viewer activated and scaling down the rendering pane scrolls the PDF in the viewer if I forget to put mouse on one side of viewer (which I am too Stoooopid to remember to do)

This seems like a nice solution, per note rather than going in and out of options) but couldnt this be implemented hidden with a button to do it?

Or, even, what I'd really like is for mouse scrolling to be turned off in PDF viewer
Or, even, a way of minimising the PDF viewer so that I can scroll up and down without getting seasick :grinning:

PS this is replying to @personalizedrefriger as I used their solution but I am not asking them to implement it :slight_smile:

EDIT: Actually, what is the opposite code, for turning the viewer on with CSS?

if you are still trying to figure this out, the I use is to use the details tag to do this.

<details><summary>WNDR3400v3_UM_19June2014.pdf</summary>
	
[WNDR3400v3_UM_19June2014.pdf](:/06004c8bc2f245b88801541786eb6927)
</details>

The details tag creates a little open/close handle to "hide" the contents when closed. If you mostly want show the PDF, use the details to hide the PDF you do not want to show. This will work in the viewer without having to modify the note. The summary tag is optional.

1 Like

I like it! It's a lot of … text, but it is a reasonably not terrible solution. :slight_smile: