Comments (7)
A few initial comments:
electron-pdf
needs to be some kind of daemon process in order to add window pooling, because currentlyelectron-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.
@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.
@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.
@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.
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 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.
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)
- Refactor waitForText to use HTML body (allows to wait for non-visual text) HOT 3
- Docker Swarm mode misc. points HOT 2
- Feature request: Debian packages HOT 4
- Styles not being rendered correctly HOT 3
- Empty PDFs when writing to file using Node.js... HOT 1
- insecure dependency
- How to disable certificate check? HOT 2
- Version 10 of node.js has been released
- Private Websites HOT 1
- Unable to install on Debian 9 HOT 1
- An in-range update of supertest is breaking the build 🚨 HOT 2
- Is this repo still maintained? HOT 7
- An in-range update of eslint is breaking the build 🚨 HOT 2
- An in-range update of electron is breaking the build 🚨 HOT 1
- An in-range update of electron is breaking the build 🚨 HOT 6
- An in-range update of eslint-plugin-jest is breaking the build 🚨 HOT 6
- An in-range update of eslint is breaking the build 🚨 HOT 3
- An in-range update of prettier is breaking the build 🚨 HOT 1
- An in-range update of eslint-plugin-import is breaking the build 🚨 HOT 3
- How to use the service with a wikimedia page that needs authentication? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-render-service.