Git Product home page Git Product logo

Comments (17)

akash-joshi avatar akash-joshi commented on May 27, 2024

@kamranahmedse Should this be implemented by using a JS library to display the PDF ?

Various Electron implementations here : https://electronjs.org/apps

Let me know what we should use, as I would like to work on this.

Update : Apparently electron can use Chrome's default pdf viewer https://stackoverflow.com/questions/45874719/opening-pdf-files-in-electron

from pennywise.

The-Code-Monkey avatar The-Code-Monkey commented on May 27, 2024

Yeah I would say use the default chromium one

from pennywise.

akash-joshi avatar akash-joshi commented on May 27, 2024

Tried using file input via <input type="file"> but as it returns fakepath, it can't be used

Update : Passing path of pdf as URL just causes it to download. Similar result by calling mainWindow.loadURL on the pdf. Might have to use plugin.

Update 2 : IT FLOATS ! Could get PDF support via plugin and command line. Now to somehow get location of file and pass it as event to electron.

See the last 2 commits in my repo to see how I did it : https://github.com/akash-joshi/pennywise

from pennywise.

akash-joshi avatar akash-joshi commented on May 27, 2024

Things which need to be improved : Check for extension; this is useful when media support is added

from pennywise.

The-Code-Monkey avatar The-Code-Monkey commented on May 27, 2024

The reason you get fake path is because JavaScript can't get access to filepaths you need to do new fileReader

from pennywise.

akash-joshi avatar akash-joshi commented on May 27, 2024

@The-Code-Monkey It's working now. Check out my fork

from pennywise.

The-Code-Monkey avatar The-Code-Monkey commented on May 27, 2024

Ok will do.

from pennywise.

akash-joshi avatar akash-joshi commented on May 27, 2024

@The-Code-Monkey Now in #47

from pennywise.

The-Code-Monkey avatar The-Code-Monkey commented on May 27, 2024

Im not sure how it works ive selected a file and its not clear what im supposed to do next?

from pennywise.

The-Code-Monkey avatar The-Code-Monkey commented on May 27, 2024

Ive added some styles i will make a pr to your fork ive not modified any of the files except from adding some styles to make it not the default button.

from pennywise.

akash-joshi avatar akash-joshi commented on May 27, 2024

Wait

from pennywise.

akash-joshi avatar akash-joshi commented on May 27, 2024

I've removed that, check #47 . Are you on twitter, Tele or somewhere ? For faster communication

from pennywise.

The-Code-Monkey avatar The-Code-Monkey commented on May 27, 2024

I'm on twitter @exoticcollector

from pennywise.

The-Code-Monkey avatar The-Code-Monkey commented on May 27, 2024

Ive got the loaded file console logging the base 64 for the file it just need to now be displayed onto the page but im unsure of how you have set the rest of it up.

from pennywise.

The-Code-Monkey avatar The-Code-Monkey commented on May 27, 2024

I have pushed to my local master branch if you want to take a look at what i have done i cant do much more today

from pennywise.

akash-joshi avatar akash-joshi commented on May 27, 2024

From #47, you just have to go under file -> open, or press cmd or ctrl + O and select the pdf you want to open.

from pennywise.

The-Code-Monkey avatar The-Code-Monkey commented on May 27, 2024

Ah ok

from pennywise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.