electron-pdf | 📄 A command line tool to generate PDF from URL, HTML or Markdown files

 by   fraserxu JavaScript Version: 25.0.0 License: MIT

kandi X-RAY | electron-pdf Summary

kandi X-RAY | electron-pdf Summary

electron-pdf is a JavaScript library typically used in Utilities, Nodejs applications. electron-pdf has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can install using 'npm i electron-pdf' or download it from GitHub, npm.

[NPM version][npm-image]][npm-url] [build status][travis-image]][travis-url] [Downloads][downloads-image]][downloads-url]
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              electron-pdf has a medium active ecosystem.
              It has 1187 star(s) with 138 fork(s). There are 28 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 48 open issues and 80 have been closed. On average issues are closed in 57 days. There are 13 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of electron-pdf is 25.0.0

            kandi-Quality Quality

              electron-pdf has 0 bugs and 0 code smells.

            kandi-Security Security

              electron-pdf has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              electron-pdf code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              electron-pdf is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              electron-pdf releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.
              electron-pdf saves you 11 person hours of effort in developing the same functionality from scratch.
              It has 33 lines of code, 0 functions and 15 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed electron-pdf and discovered the below as its top functions. This is intended to give you an instant insight into electron-pdf implemented functionality, and help decide if they suit your requirements.
            • Sets the instances of the logger to this instance
            Get all kandi verified functions for this library.

            electron-pdf Key Features

            No Key Features are available at this moment for electron-pdf.

            electron-pdf Examples and Code Snippets

            How can i generate a .ejs file to pdf in NODEJS with angularjs?
            JavaScriptdot img1Lines of Code : 15dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            var ElectronPDF = require('electron-pdf')
            var express = require('express')
            var bodyParser = require('body-parser')
            var app = express()
            app.use(bodyParser.json())
            
            var exporter = new ElectronPDF()
            exporter.on('charged', () => {
                //Onl

            Community Discussions

            QUESTION

            Electron build app doesnt start express server
            Asked 2019-Jun-28 at 00:31

            I'm building an app and all works fine while I'm in developer mode. Everythink works as it should. But when I package my app with electron-builder, app opens but it doesnt start express server and app doesnt work properly.

            Here is my package.json code

            ...

            ANSWER

            Answered 2018-May-21 at 07:34

            I had something similar happen to me. The challenge was that if you use fork() the application path changes. So I would recommend that you check __dirname in all of your files especially the ones in your forked process (e. g. app.js). I wouldn't be surprised if some of them don't make sense anymore.

            Source https://stackoverflow.com/questions/50436594

            QUESTION

            Electron PDF window navigate to page number possible?
            Asked 2019-Mar-30 at 12:30

            Is it possible to jump to PDF page number using the electron PDF window library?https://github.com/gerhardberger/electron-pdf-window

            ...

            ANSWER

            Answered 2019-Mar-30 at 12:30

            For anyone interested in support of PDF viewer in election version 3.1.7 use the mentioned plugin above. To use PDF navigation in URL, to navigate using file:pathofyour.pdf#page=pagenumber just uncomment the content in isPDF() function and replace it with resolve(true)

            Electron is a great way to develope cross platform applications but the api is not really mature and is alternated a way to often with every major release in my opinion

            Source https://stackoverflow.com/questions/55384590

            QUESTION

            Rendering PDF with no frame in Node.js (Electron app)
            Asked 2018-Dec-30 at 05:48

            I'm in the process of writing an app in Electron. The app requires there to be a pdf rendered in a frame that takes up approximately 50% of the window. Because of the somewhat restricted space, I would like a solution that allows me to render a PDF without any frame, margin or controls bar around it. In macOS native apps, you have access to PDFView, which is a PDF renderer with nothing around it. I'm trying to find the closest thing to this, but for Node.js/Electron.

            Before this gets marked as duplicate, I've read through a number of "Rendering PDF's in electron" posts on here. All of them pointed towards a number of libraries, notably "electron-pdf-window". The problem with the library is that all it does is wrap up "PDF.js". I've looked through PDF.js as well as the examples, but it also has the chrome-style frame and controls.

            Are there any libraries/implementations of a PDF viewer for Node.js/Electron that provide a near-native (macOS) experience, in a "frameless" window? It needs to have copy/paste support, as well as support for trackpad gestures. Additionally, it should be able to support documents of at least a hundred pages.

            Side question - Are you able to modify the default Chrome PDF viewer? (i.e remove the top "controls" bar, as well as trim down all the margins)? This seems like the fastest (most efficient) way to do it, but I'm not sure if it's possible.

            ...

            ANSWER

            Answered 2018-Dec-30 at 05:48

            After some research and testing, I've found that you can make a very minimal version of PDF.js. The "pinch-to-zoom" functionality isn't as smooth as on a native app, but you can get fairly close if you use PDF.js' experimental SVG renderer.

            Here are some examples of a full PDF viewer with no toolbar: https://github.com/mozilla/pdf.js/tree/master/examples/components

            Source https://stackoverflow.com/questions/53971382

            QUESTION

            Converting HTML string, including style, to PDF (Electron - React - Typescript)
            Asked 2018-Dec-29 at 12:51

            _____ Project Overview _____

            I am building an Electron application, using React and Typescript, in which I read a plain HTML string to memory to then adjust some elements in it and finally convert it to a pdf.

            _____ Problem Description _____

            Because the html is never really rendered (it is just in memory), I am uncertain on how to convert the html (with style) to a pdf without rendering the html first.

            _____ What I've tried _____

            • I have tried using a combination of html2canvas and jspdf. jspdf works fine to convert the HTML, without styling, to pdf, but I need the styling. So I tried getting a "screenshot" of my page with html2canvas first but that fails because the page is never rendered.
            • I tried using electron-pdf, but I could not get this to work in my application. It works fine as a command line tool though, so an option would be to invoke the command line tool. I think that that should work, but it feels very hacky (so I'd prefer not going that route).

            _____ Code _____

            ...

            ANSWER

            Answered 2018-Dec-29 at 12:51

            According to Generating PDF with Electron.js, it seems possible to use the webContents method printToPDF in a new BrowserWindow without actually showing the window:

            Source https://stackoverflow.com/questions/53966376

            QUESTION

            electron pdf window doesnt work after build
            Asked 2018-Feb-25 at 22:51

            I'm trying to open pdf in electron app with electron-pdf-window. Its working fine before build but when i build app as installer .exe file for windows and install exe file on windows 8.1 , its not showing pdf window, i am using it through renderer process on click of anchor. Any ideas? here is my code

            ...

            ANSWER

            Answered 2018-Feb-25 at 22:51

            If you're using the latest Electron 1.8 or newer, it has built in PDF support in BrowserWindow's and tags. You just have to ensure plugins are enabled:

            BrowserWindow

            Source https://stackoverflow.com/questions/48965710

            QUESTION

            Opening a local pdf file using node.js and express
            Asked 2017-Aug-17 at 11:56

            I am attempting to make a pdf viewer app using electron and electron-pdf-window the code below works when i want to open from a URL file path, but when i tried to open a pdf from my local files using the file:/// the application download the pdf instead of viewing it on my window.

            ...

            ANSWER

            Answered 2017-Aug-17 at 11:56

            Base on this readme, https://github.com/electron/electron/blob/master/docs/api/browser-window.md

            you can do it something like

            win.loadURL(`file://${__dirname}/app/index.html`)

            but you have to put this inside app.on('ready', function() {} to avoid getting the Cannot create BrowserWindow before app is ready error.

            Reason why that error appears Because the app is not yet ready and is still loading

            Source https://stackoverflow.com/questions/45732352

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install electron-pdf

            You can install using 'npm i electron-pdf' or download it from GitHub, npm.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i electron-pdf

          • CLONE
          • HTTPS

            https://github.com/fraserxu/electron-pdf.git

          • CLI

            gh repo clone fraserxu/electron-pdf

          • sshUrl

            git@github.com:fraserxu/electron-pdf.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular JavaScript Libraries

            freeCodeCamp

            by freeCodeCamp

            vue

            by vuejs

            react

            by facebook

            bootstrap

            by twbs

            Try Top Libraries by fraserxu

            soundredux-native

            by fraserxuJavaScript

            react-dropdown

            by fraserxuJavaScript

            react-chartist

            by fraserxuJavaScript

            book-gpt

            by fraserxuTypeScript

            diagram-gpt

            by fraserxuTypeScript