# Display pdf in Joplin?

**URL:** <https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088>\
**Category:** Support\
**Created:** [30 October 2020 10:53 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088 "2020-10-30T10:53:53Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafikiphoto](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rafikiphoto/32/164_2.png) [@rafikiphoto](https://discourse.joplinapp.org/u/rafikiphoto)\
**Post date:** [30 October 2020 10:53 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/1 "2020-10-30T10:53:53Z")

</div>

Is it possible to have Joplin display pdf files in the viewer instead of just a link?

Win 10 64 bit

Joplin 1.3.10 (prod, win32)

Client ID: 61da1c8af75f4a16ba48e72b31d78869  
Sync Version: 2  
Profile Version: 34  
Keychain Supported: Yes

Revision: 0f6932f1e (master)

---

<div class="post-metadata">

**Author:** ![rxliuli](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rxliuli/32/4083_2.png) [@rxliuli](https://discourse.joplinapp.org/u/rxliuli)\
**Post date:** [30 October 2020 13:49 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/2 "2020-10-30T13:49:16Z")

</div>

With the plug-in system, I think this is no longer a difficult task

---

<div class="post-metadata">

**Author:** ![dpoulton](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/dpoulton/32/29723_2.png) [@dpoulton](https://discourse.joplinapp.org/u/dpoulton)\
**Post date:** [30 October 2020 13:51 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/3 "2020-10-30T13:51:34Z")

</div>

There are quite a few posts on the forum about this. This comment was added to a recent one.

> [@Feature request: Inline PDF](https://discourse.joplinapp.org/t/feature-request-inline-pdf/142/38):
>
> 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.

---

<div class="post-metadata">

**Author:** ![rafikiphoto](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rafikiphoto/32/164_2.png) [@rafikiphoto](https://discourse.joplinapp.org/u/rafikiphoto)\
**Post date:** [30 October 2020 14:00 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/4 "2020-10-30T14:00:42Z")

</div>

Thanks. I'm beginning to come to the conclusion that Joplin is for techies, not for non-technical migrants from Evernote. I have seen nowhere within the programme indicating where I might find plugins or how to install them. Equally I have no idea what Electron is, I thought it was a form of Visa credit card! 🙂

---

<div class="post-metadata">

**Author:** ![rxliuli](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rxliuli/32/4083_2.png) [@rxliuli](https://discourse.joplinapp.org/u/rxliuli)\
**Post date:** [30 October 2020 14:12 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/5 "2020-10-30T14:12:25Z")

</div>

The plugin is in 1.3 beta (this is a major update): [Pre-release 1.3 with plugin support is now available! (Updated 29/10/20)](https://discourse.joplinapp.org/t/pre-release-1-3-with-plugin-support-is-now-available-updated-29-10-20/11562/44)  
Electron is the implementation of Joplin's underlying technology. It is used to write the desktop version of Joplin for three platforms at a time (otherwise it will be written three times): [https://www.electronjs.org/](https://www.electronjs.org/)

---

<div class="post-metadata">

**Author:** ![rafikiphoto](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rafikiphoto/32/164_2.png) [@rafikiphoto](https://discourse.joplinapp.org/u/rafikiphoto)\
**Post date:** [30 October 2020 14:19 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/6 "2020-10-30T14:19:24Z")

</div>

Thank you for the explanation. I am running 1.3x. I have seen references on here to plugins but never a mention of specific offerings. I suppose they will be along now that they can be added. I hope there will be a tutorial to tell us how to do that.

---

<div class="post-metadata">

**Author:** ![rxliuli](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rxliuli/32/4083_2.png) [@rxliuli](https://discourse.joplinapp.org/u/rxliuli)\
**Post date:** [30 October 2020 14:31 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/7 "2020-10-30T14:31:48Z")

</div>

This is still a very initial plug-in system, and there are still many things that are not perfect, including ordinary plug-in installation and uninstallation, which are troublesome. . . @rafikiphoto  
In addition, I’m not sure if the joplin plugin allows you to get the currently edited note while running a custom rendering function. What will happen in a visible-is-what-you-get editor? If there is no problem, I can try to use pdf.js to implement joplin pdf preview support. @laurent

---

<div class="post-metadata">

**Author:** ![rafikiphoto](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rafikiphoto/32/164_2.png) [@rafikiphoto](https://discourse.joplinapp.org/u/rafikiphoto)\
**Post date:** [30 October 2020 14:38 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/8 "2020-10-30T14:38:11Z")

</div>

I'm grateful for the clarification.

---

<div class="post-metadata">

**Author:** ![rxliuli](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rxliuli/32/4083_2.png) [@rxliuli](https://discourse.joplinapp.org/u/rxliuli)\
**Post date:** [30 October 2020 15:55 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/9 "2020-10-30T15:55:29Z")

</div>

I found out how to implement it, but it seems that there is still a problem with joplin's plugin system. . . @laurent  
Steps to reproduce

1. Use yo joplin to generate the initial project
2. Open joplin and specify the path in the plugin, for example `C:\Users\rxliuli\Text\vscode\joplin-plugin-test\dist\index.js`
3. Open the developer console, an error occurs

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/8/8e3359d891db6fd9b6e943108c7ef5b8b6c02d01.png)

In addition, there is a very annoying problem that the console will always disappear every time you use Ctrl+R to refresh, which is very unfavorable for developing Joplin plugins. I will continue to wait for news, and I may not migrate my notes until Joplin 1.3 is stable.

> Besides, there is no other meaning, I want to know if I encounter development-related problems, besides @laurent, who else should I ask?

Joplin 1.3.10 (prod, win32)

Client ID: 54cec8f847fc4c5ba6ebeac38e34890e  
Sync Version: 2  
Profile Version: 34  
Keychain Supported: No

Revision: 1e3bd937e (master)

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [30 October 2020 16:10 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/10 "2020-10-30T16:10:28Z")

</div>

As the error message says, the manifest is missing. Did you run `npm run dist` in the plugin folder? Is there a manifest.json file in /src?

---

<div class="post-metadata">

**Author:** ![rxliuli](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rxliuli/32/4083_2.png) [@rxliuli](https://discourse.joplinapp.org/u/rxliuli)\
**Post date:** [30 October 2020 16:12 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/11 "2020-10-30T16:12:47Z")

</div>

Yes, I confirm that `index.js/manifest.json` exists

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/2X/9/987239bfbf79ecbcee7b2b22aee03d9d11bbce95.png)

```json
{
	"manifest_version": 1,
	"name": "joplin-plugin-test",
	"description": "",
	"version": "1.0.0",
	"author": "",
	"homepage_url": ""
}

```

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [30 October 2020 16:16 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/12 "2020-10-30T16:16:24Z")

</div>

You need to give it the path to the plugin folder, so `C:\Users\rxliuli\Text\vscode\joplin-plugin-test` should work.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [30 October 2020 16:19 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/13 "2020-10-30T16:19:14Z")

</div>

If you haven't done so already it would be worth starting from this page and try to build a simple plugin: [https://joplinapp.org/api/get\_started/plugins/](https://joplinapp.org/api/get_started/plugins/)

---

<div class="post-metadata">

**Author:** ![rxliuli](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/rxliuli/32/4083_2.png) [@rxliuli](https://discourse.joplinapp.org/u/rxliuli)\
**Post date:** [30 October 2020 16:46 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/14 "2020-10-30T16:46:33Z")

</div>

I try to use MarkdownItPlugin to deal with this problem, but I am not sure how to communicate with the main process, for example, I need to get the binary stream of the PDF, but the premise is that the script in the assets can communicate with the main process and delegate the main process in some way Get the binary stream and return it to the markdown rendering script. I saw the following description

> - The `context` argument is currently unused but could be used later on to provide access to your own plugin so that the content script and plugin can communicate.

What is the type of context? Are there any examples available?

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [30 October 2020 16:54 UTC](https://discourse.joplinapp.org/t/display-pdf-in-joplin/12088/15 "2020-10-30T16:54:37Z")

</div>

Not sure, I'd need to see the code, but couldn't you package the renderer code as a markdown-it plugin? At the moment, the context param is not implemented, but why does it need to communicate with the plugin process?
