Feature request: Inline PDF

Inline PDFs is one of my primary use cases for Evernote, and I would really like to be able to stop using Evernote.

However:

  • I have Evernote notes with multiple attachments (for example, a list of products, each with its own PDF tearsheet); granted, in this case I generally hide inline PDFs to economize space.
  • I frequently include freeform (ie unstructured) commentary above a PDF (such as bibliographic data for an academic paper). (Yes, I know there are better solutions for this.)
  • My main use case that matches @Mirthe's is probably bills, invoices, and receipts that I dump in Evernote just in case I might need them later (and also because I distrust file systems).

This being said, though, the more important thing for me is probably being able to search the contents of attachments alongside the contents of notes. Would the following be feasible alongside or independent from inline PDFs?

Given:

  • A Joplin instance syncs via Nextcloud
  • The Nextcloud instance has full-text search set up (ideally with PDF support set up as as well)

Then:

  • Joplin search will use Nextcloud search to search the contents of Joplin attachments

I can create a separate thread for search within attachments if y'all think that would be helpful.

(For what it's worth, I will probably finish migrating from Evernote regardless.)

1 Like

I think the ability to search attachment contents would be great but wouldn't this method only allow this feature to a sub-set of Joplin users, namely, those using a suitably configured Nextcloud server and not using E2EE? I only mention it as I am sure that there would be many other users out there who do not use Nextcloud or do use E2EE that would really like this feature.

I suppose that the idea of linking a function just to Nextcloud is not unprecedented (note sharing). But for something as useful as this I would suggest that an in-client method, however that would be implemented, would be an approach that benefits all users.

1 Like

Took a stab at this but it seems the support for embedding pdf is only available starting from Electron version 9. Joplin is on 8 at the moment and it seems Laurent is reluctant to upgrade.

1 Like

To be honest, it’s normal not to be willing to upgrade. God knows what is wrong with the new version of electron.

I missed that post but just to clarify if you can add PDF preview support we can upgrade to Electron 9. We'll probably upgrade at some point anyway.

2 Likes

There you go: https://github.com/laurent22/joplin/pull/4008

4 Likes

Heh, there is a reason why I love Joplin so :heart_eyes_cat:

(Sorry late to the party)

For anyone biting their nails waiting for an update from laurent : https://github.com/laurent22/joplin/pull/4008#issuecomment-741940881

Thanks for the work, @roman_r_m!

1 Like

Yes it will be in the next release, along with audio and video players. I had an idea on how to implement it after discussing it with Roman.

2 Likes

Out of interest is this going to be globally on/off selectable by the user or will it allow something like the "image display marker" (!) to display a pdf inline? Something like ![Example.pdf](:/cb159e8cdbce40ffb94d3a31cdabcdef). It would be great if a user could choose to just link or display depending on need.

Just thinking of those that may just want to reference pdfs in the middle of a paragraph.

For now it will be global settings which you can enable/disable in the Config screen, for pdf, audio or video files. We won't support ![Example.pdf](:/cb159e8cdbce40ffb94d3a31cdabcdef) because it's not standard Markdown (its been discussed before for video files and it's not a good idea because it will break if displayed outside Joplin).

However I was thinking about adding a menu entry like "Toggle media players" which would allow users to toggle the players on and off using a shortcut.

3 Likes

Inline display of pdfs is a great step forward for me.

To stop them automatically showing I wrap the link in the following code -

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

(:/cb159e8cdbce40ffb94d3a31cdabcdef)

</details>

HTH

3 Likes

Maybe it would be also possible to store the info if the PDF (Media File) should be displayed inline or as attachment in the metadata of the file, then it would be possible to decide the per file (That's how it was in Evernote I think).

1 Like

I'm having some difficulting understanding the status of this feature request. Has the feature been implimented? If so, how do I see inline PDFs? Thanks for this. Super useful!

In this topic is a short description.

Thank you!

Wanted to circle back and say that the current PDF viewer is great for previewing documents but doesn't really work for inline images since it expands the vertical boundary. Screen shots attached, along with a screenshot of Typora, which handles PDFs in the way I'd hope for.

Thanks for all the work work that went into this update. Just wanted to report on this use case.

Typora

Joplin

Hi,
Was just wondering how did you make joplin show two notes at the same time. I'm referring to the last image. At the top a note with two panes - markdown and viewer, at the bottom the 'Wisdome of the crowd'.. How did you make it appear below the note?
Thanks in advance and have a good day

I think it's just one note with a table.

thank you for this solution.
It works, but I experienced some strange behaviors with removing empty lines or adding whitespaces/tabstops.
@laurent maybe you have an idea, what's causing these issues?

  1. If there is no empty line between </summary> and the link, the PDF markdown link won't be parsed.
    Example:
<details close>
<summary>Show pdf ...</summary>
[linkname](:/cb159e8cdbce40ffb94d3a31cdabcdef)
</details>
  1. If there are spaces or tabs in the same line before the link, the PDF markdown link won't be parsed.
    Example:
<details close>
<summary>Show pdf ...</summary>
      [linkname](:/cb159e8cdbce40ffb94d3a31cdabcdef)
</details>
  1. the markdown link without square brackets (before the parentheses), doesn't work.
    AFAIK that's invalid markdown, therefore I wonder that this example should work - Am I wrong?
    Example:
<details close>
<summary>Show pdf ...</summary>

(:/cb159e8cdbce40ffb94d3a31cdabcdef)
</details>