-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble running in NW.js #19
Comments
Hi Greg, I've not tested or used NW.js, so i'm glad you picked an easy test case. :-)
|
Hi Brent, A little background: I'm making a desktop app that builds a PowerPoint presentation by reading embedded metadata (creator, title, caption, etc.) and inserting it in the slide beside the image. One problem I was having with officegen was aligning text vertically. I was happy to find PptxGenJS which has a valign attribute. To answer your questions:
I have had success running officegen by using: var officegen = require('officegen'); var pptx = officegen ( 'pptx' ) |
Hi Greg, That's a really cool project idea. Once we determine what's needed to get NW.js stood up, i'll update the documentation to help others going forward. Lack of errors or output sure sounds like we're not even getting off the ground. Try to get the version from the console: If so, then you're on the right track with the package requirements being the issue. |
Hi Brent,
Thanks very much for pursuing this. I’m having some success, but still can’t generate a PPTX.
I can read the version number:
console.log('pptxgenjs version: ' + pptxgenjs.getVersion() );
result: pptxgenjs version: 1.1.5
But I can’t run create a new presentation:
var pptx = new PptxGenJS();
result: Uncaught ReferenceError: PptxGenJS is not defined
I tried these variations without success:
var pptx = new pptxgenjs();
var pptx = new pptxgenjs.PptxGenJS();
var pptx = new PptxGenJS().pptxgenjs;
This is probably a simple mistake I’m making. Do you have any ideas?
Thanks,
Greg
From: Brent Ely [mailto:[email protected]]
Sent: Monday, January 16, 2017 7:45 PM
To: gitbrent/PptxGenJS <[email protected]>
Cc: Reser, Gregory <[email protected]>; Author <[email protected]>
Subject: Re: [gitbrent/PptxGenJS] Trouble running in NW.js (#19)
Hi Greg,
Version 1.1.5 has resolved this issue. I'm embarrassed to admit this is all my fault - the export line required for Node.js/NW.js to utilize the module was accidentally removed a whole back and it's not something i've tested with in while and... ugh.
It's running for me in Node.js now and i've updated the Readme with integration details:
var pptxgenjs = require("pptxgenjs").PptxGenJS;
You should then be able to view the version, etc.
console.log('pptxgenjs version: ' + pptxgenjs.getVersion() );
Thanks for reporting this!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#19 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AFM3lOl_Rg8XgdstZZB7SJiGImZDH3xPks5rTDlRgaJpZM4LWnmE>.
|
Yeah, wouldn't you know it. My initial testing was great, then after I updated the issue and tried with the NPM release it tanked. I'm working out all the remaining issues now and hope to have it done within a day or so... Sorry for jumping the gun! |
Hi Greg, Version 1.1.5 has resolved this issue. I'm embarrassed to admit this is all my fault - Node.js functionality has been defunct for some time and it's not something i've tested with in while and... ugh. It's running for me in Node.js (4.x) using npm v1.1.5-1 now and i've updated the Readme with integration details: var pptx = require("pptxgenjs"); I've also created a Node.js test script under ./examples that can be run using Thanks for reporting this! |
I am trying to run PptcGenJS in a NW.js app. I used npm to installed PptcGenJS in my app/node_modules directory. I am using this code:
var pptxgenjs = require('pptxgenjs');
var pptx = new PptxGenJS();
var slide = pptx.addNewSlide();
slide.addText('Hello World!', { x:1.5, y:1.5, font_size:18, color:'363636' });
pptx.save('Sample Presentation');
I get no result. I'm guessing I'm not calling PptxGenJS correctly
The text was updated successfully, but these errors were encountered: