Giter Site home page Giter Site logo

Comments (7)

msokk avatar msokk commented on May 30, 2024

A few initial comments:

  • electron-pdf needs to be some kind of daemon process in order to add window pooling, because currently electron-pdf boots one-off Electron instance. How would you imagine the communication model between the API service and PDF renderer? Emitting messages between child process? Or a client CLI next to server CLI?
  • An option to return the location of the file(s) instead of a stream - if this is asynchronous, then how would the other application check for valid content? Given that all the Electron render methods are sync, wouldn't it be easier to return file location after render

from electron-render-service.

Reggino avatar Reggino commented on May 30, 2024

@codecounselor how is .pptx generation related to Electron? IMHO the project currently aims to support Electron rendering in an efficient and complete way, but i don't see where officegen fits in. To keep stuff untangled, wouldn't it be wise to set-up a dedicated service / project?

from electron-render-service.

codecounselor avatar codecounselor commented on May 30, 2024

@Reggino Good question, I had thought about that a bit too. I actually think it fits better inside of electron-pdf but you could ask the same question there. I could certainly do it that way if the community feels very strongly about not including such functionality. I just thought that for a project aiming to provide html->document export functionality that PPTX formats would be desirable.

I have learned a few things since originally opening this issue. For instance, I will likely be capturing images for the slides from the PDF file and not by using Electron to capture images. Let me get a working solution first and then circle back regarding including that in one of these projects.

from electron-render-service.

codecounselor avatar codecounselor commented on May 30, 2024

@msokk It is true that electron-pdf works the way you describe, I'm working on changing that. The render-server is launched with Electron today (vs node), so shouldn't everything in electron-pdf work if that continues to be the case? I've some a bit of experimenting with communicating between parent/child but I think I'd like to avoid that if possible.

I think we are on the same page regarding the file location. I just meant that the client may request the file at a later time (after it becomes available)

from electron-render-service.

codecounselor avatar codecounselor commented on May 30, 2024

Here is a snippet that should illustrate how electron-pdf will soon work:

  var exporter = new PDFExport()
  exporter.on('charged', () => exporter.runExport(input, output, args))
  exporter.start()

This should allow it to be used pretty much anywhere, and at this point I think the pooling implementation could be added inside of electron-pdf. In the render-service the charged event would start the express server, and exporter.runExport would be invoked for every incoming request.

from electron-render-service.

msokk avatar msokk commented on May 30, 2024

@msokk It is true that electron-pdf works the way you describe, I'm working on changing that. The render-server is launched with Electron today (vs node), so shouldn't everything in electron-pdf work if that continues to be the case?

Ah, so the electron-pdf will provide library-like API for service to consume?

@codecounselor how is .pptx generation related to Electron? IMHO the project currently aims to support Electron rendering in an efficient and complete way, but i don't see where officegen fits in. To keep stuff untangled, wouldn't it be wise to set-up a dedicated service / project?

I'm not against rendering PPT(X) unless there is a simple tool converting PDF pages to PPT or the support adds some extra binaries.

from electron-render-service.

codecounselor avatar codecounselor commented on May 30, 2024

Thanks for the response. I think I'm going to go down the path of creating a new npm module for PDF->PPTX conversion that can listen for events from electron-pdf as PDF files are ready (when processing a list of URLs). Perhaps when I am done with that we can review electron-pdf and see if it makes sense to integrate the two.

from electron-render-service.

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.