Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
electron-pdf-window-s
Advanced tools
This repo is a updater version of electron-pdf-window.
view PDF files in electron browser windows. this module adds support for viewing
PDF files in electron BrowserWindow
s.
it works even if you navigate to a PDF file from a site, or opening a PDF file in
a new window. a PDFWindow
instance is just a subclass of BrowserWindow
so it
can be used just like it.
const { app } = require('electron')
const PDFWindow = require('electron-pdf-window')
app.on('ready', () => {
const win = new PDFWindow({
width: 800,
height: 600
})
win.loadURL('http://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf')
})
$ npm i electron-pdf-window
win = new PDFWindow([opts])
win
is an electron BrowserWindow
that has support for viewing PDF files.
PDFWindow.addSupport(win)
adds PDF viewing support for win
, which is a BrowserWindow
instance.
Using the PDFWindow
class directly from the renderer process is not
recommended, because electron doesn't support proper extending of their built-in
classes. In order to add PDF support from the renderer, use the addSupport
method.
const { BrowserWindow } = require('electron').remote
const PDFWindow = require('electron-pdf-window')
const win = new BrowserWindow({ width: 800, height: 600 })
PDFWindow.addSupport(win)
win.loadURL('file:///a/b/c.pdf')
$ npm test
1.0.0 - 2020-10-09
FAQs
View pdf in new browser windows.
The npm package electron-pdf-window-s receives a total of 10 weekly downloads. As such, electron-pdf-window-s popularity was classified as not popular.
We found that electron-pdf-window-s demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.