Plugin for viewing PDF documents in IntelliJ-based IDEs.
MIT License
IntelliJ PDF Viewer plugin adds support for viewing PDF files in IntelliJ-based IDEs. This plugin uses recently integrated (2020.2
) CEF (Chromium Embedded Framework) browser to render PDF documents with PDF.js library.
If you want to support PDF Viewer development, just give a star on GitHub or write a review on the marketplace page.
In case you encountered any bugs, feel free to create an issue.
Using IDE built-in plugin system: Preferences
> Plugins
> Marketplace
> Search for "PDF Viewer"
> Install Plugin
. (See Install plugin from repository)
Manually: download the latest release and install it manually using
Preferences
> Plugins
> ⚙️
> Install plugin from disk...
. (See Install plugin from disk)
Add https://plugins.jetbrains.com/plugins/alpha/14494
to the list of plugin repositories in Settings
> Plugins
> ⚙️
> Manage Plugin Repositories
> ➕
. (See Custom plugin repositories)
Or manually download latest alpha release from here and install it in the same way as stable version.
To build plugin use buildPlugin
gradle task. This will produce ready to use zip
archive with plugin contents.
To run/debug IDE with this plugin runIde
task should be used.
Plugin code is divided into several modules:
plugin
- contains most of the IDE-side plugin code.model
- shared classes representing PDF Viewer data model.mpi
- common implementation of message passing interface which is needed to pass messages between IDE and browser.web-view
bootstrap
- sets up PDF.js
and runs bootstrap code for actual web-view application.viewer
- contains actual web-view implementation.Starting from 2020.2 EAP
(more precisely 202.4357.23-EAP-SNAPSHOT
) all IDEs should have bundled JCEF with ide.browser.jcef.enabled
registry flag set to true
. So the plugin should just work. If it doesn't work, please check if Markdown plugin works. Check its preview providers and confirm that JCEF is present.
2020.2 EAP
You can't run this plugin without modifying PdfEditorPanelProvider
with builds before 2020.2 EAP
. If you really want to - you should change JCEF presence detection with code from early versions (look at 0.0.4
tag).
Since CEF browser is still an experimental feature, there is a high chance that it is not shipped by default with your IDE. To be able to use CEF functionality you need to switch to version of JBR that supports it. See this issue for more details. You can learn how to switch IDE runtime here.
This plugin is still in it's early stage, so some major bugs can occur.