Comments (11)
@scorpwarp23 Does the PPT include embedded charts?
from officegen.
Nope. Just images and text. Funny thing is it works on my Ubuntu desktop.
The moment I run it on a VM it never exits
On Friday, June 19, 2015, Pieter Sheth-Voss [email protected]
wrote:
@scorpwarp23 https://github.com/scorpwarp23 Does the PPT include
embedded charts?—
Reply to this email directly or view it on GitHub
#64 (comment)
.
Shrenik Kenia
+91-9820520019
from officegen.
@scorpwarp23 Could you run the following diagnostic? (I don't have an Ubuntu test machine set up yet)
I divided the tests to see if it's generating charts.
- Clone the repo https://github.com/pietersv/officegen
- Run
npm test
or test files individually:mocha test/test-pptx-nocharts.js
mocha test/test-pptx-charts.js
If it works for the nocharts
but fails for the charts
my next question is whether jar
is on the path, so try which jar
. The embedded charts use jar
to zip the contents of embedded xlsx file. The fork this is copied from originally required zip
to be on the path, but Heroku only had jar
. A better solution is to use pure-JS lib such as jszip.
from officegen.
Here's the output:
Note, it passed both tests. FYI, my issue is fundamentally the same as
#26. Basically all i see is
an 8KB file. Is one of the libraries you're using using some kind of
command line util that is available on my desktop but on the VM by default?
root@demo:~/Temp/officegen# mocha test/test-pptx-nocharts.js
PPTX generator
✓ creates a presentation with properties and text (346ms)
✓ creates slides with shapes (91ms)
✓ creates presentation to widescreen (88ms)
✓ creates slides with images (403ms)
✓ creates a native table (95ms)
5 passing (1s)
root@demo:~/Temp/officegen# mocha test/test-pptx-charts.js
PPTX generator
✓ creates a slides with charts (261ms)
✓ creates a presentation with charts (318ms)
✓ creates a presentation with charts (235ms)
✓ creates a presentation with charts (236ms)
✓ creates a presentation with charts (227ms)
✓ creates a presentation with charts (217ms)
6 passing (2s)
On Fri, Jun 19, 2015 at 7:09 PM, Pieter Sheth-Voss <[email protected]
wrote:
@scorpwarp23 https://github.com/scorpwarp23 Could you run the following
diagnostic? (I don't have an Ubuntu test machine set up yet)
I divided the tests to see if it's generating charts.
- Clone the repo https://github.com/pietersv/officegen
- Run npm test or test files individually:
- mocha test/test-pptx-nocharts.js
- mocha test/test-pptx-charts.js
If it works for the nocharts but fails for the charts my next question is
whether jar is on the path, so try which jar. The embedded charts use jar
to zip the contents of embedded xlsx file. The fork this is copied from
originally required zip to be on the path, but Heroku only had jar. A
better solution is to use pure-JS lib such as jszip.—
Reply to this email directly or view it on GitHub
#64 (comment)
.
Shrenik Kenia
+91-9820520019
from officegen.
@scorpwarp23 Thanks! The charts do rely on jar
being on the path (i.e. the Java Archive tool which creates zip files). It's possible that it's not finding it. On terminal type which jar
and in Node try:
var cmd = 'which jar';
var a = exec(cmd, function(err, stdout, stderr) { console.log(stdout, stderr); })
I'm wondering how the tests could yield a false positive. The PowerPoint tests work by
- generating an output file to the file system, e.g.
/tmp/test-ppt-chart0.pptx
- reading it from the file system
- unzipping it using jszip
- reading the contents, specifically two subfiles
ppt/slides/slide1.xml
andppt/charts/chart1.xml
- comparing them as strings to a reference file
If you do a listing of /tmp
do you see the generated test files?
from officegen.
I divided the examples into two files as well:
- examples/make_pptx.js
- examples/make_pptx_charts.js
Can you fetch these from the branch and see if one/both work?
from officegen.
Ok I ran this:
var cmd = 'which jar';
var exec = require('child_process').exec;
var a = exec(cmd, function(err, stdout, stderr) { console.log(stdout,
stderr); })
I got /usr/bin/jar
Also as I said before I'm not using charts.
On Fri, Jun 19, 2015 at 8:22 PM, Pieter Sheth-Voss <[email protected]
wrote:
@scorpwarp23 https://github.com/scorpwarp23 Thanks! The charts do rely
on jar being on the path (i.e. the Java Archive tool which creates zip
files). It's possible that it's not finding it. On terminal type which jar
and in Node try:var cmd = 'which jar';var a = exec(cmd, function(err, stdout, stderr) { console.log(stdout, stderr); })
—
Reply to this email directly or view it on GitHub
#64 (comment)
.
Shrenik Kenia
+91-9820520019
from officegen.
Sincere apologies, I misread that as meaning it was generating just the text and images.
from officegen.
Nah. It's generating a 8KB file. Ok now this is funny. When I run the
example it works fine and generates the powerpoint. However, in my code it
is not working (on the server only, works fine on desktop). Could this be a
RangeError or something?
On Fri, Jun 19, 2015 at 8:32 PM, Pieter Sheth-Voss <[email protected]
wrote:
Sincere apologies, I misread that as meaning it was generating just the
text and images.—
Reply to this email directly or view it on GitHub
#64 (comment)
.
Shrenik Kenia
+91-9820520019
from officegen.
That 8KB file is incomplete. Basically finalise is never reached. I meant
to say the example works on the server as well as the desktop. But my code
does not throw any errors but still generate's finalise event is never
reached. Also could it be something about pptx writing a stream rather than
a buffer. Cause the approximately 8KB file (8006 bytes) makes me think this
is a buffer / stream issue.
On Fri, Jun 19, 2015 at 8:33 PM, Shrenik Kenia [email protected]
wrote:
Nah. It's generating a 8KB file. Ok now this is funny. When I run the
example it works fine and generates the powerpoint. However, in my code it
is not working (on the server only, works fine on desktop). Could this be a
RangeError or something?On Fri, Jun 19, 2015 at 8:32 PM, Pieter Sheth-Voss <
[email protected]> wrote:Sincere apologies, I misread that as meaning it was generating just the
text and images.—
Reply to this email directly or view it on GitHub
#64 (comment)
.Shrenik Kenia
+91-9820520019
Shrenik Kenia
+91-9820520019
from officegen.
Hey really sorry for the trouble. So I managed to fix the issue. It was a
bug on my part - was calling the add text method with a variable that was
broken. Strange thing is it never threw me an error. Guess you need an
update there - if add text is passed null or undefined.
On 19-Jun-2015 20:36, "Shrenik Kenia" [email protected] wrote:
That 8KB file is incomplete. Basically finalise is never reached. I meant
to say the example works on the server as well as the desktop. But my code
does not throw any errors but still generate's finalise event is never
reached. Also could it be something about pptx writing a stream rather than
a buffer. Cause the approximately 8KB file (8006 bytes) makes me think this
is a buffer / stream issue.On Fri, Jun 19, 2015 at 8:33 PM, Shrenik Kenia [email protected]
wrote:Nah. It's generating a 8KB file. Ok now this is funny. When I run the
example it works fine and generates the powerpoint. However, in my code it
is not working (on the server only, works fine on desktop). Could this be a
RangeError or something?On Fri, Jun 19, 2015 at 8:32 PM, Pieter Sheth-Voss <
[email protected]> wrote:Sincere apologies, I misread that as meaning it was generating just the
text and images.—
Reply to this email directly or view it on GitHub
#64 (comment)
.Shrenik Kenia
+91-9820520019Shrenik Kenia
+91-9820520019
from officegen.
Related Issues (20)
- How to add Sections in word file with Officegen ? and how to set font size and to make it bold for entire column in a table
- How to set the first line indentation for a paragraph in word?
- Can i remove Header and Footer from First page ( Title Page ) and some more queries
- Why does the table fill color not work?
- Cannot generate word file in render process for one Electron app
- How to add repeat header in table docx
- How to insert image into tableceil in docx
- how to open a word document ?
- Is addImage with svg supported for pptx file?
- How to assign color property to newline in table cell in word document ?
- 如何将word转换html,html里面的style css可以转换?
- Embedded File is still being accessed by createReadStream asynchronously even after deletion in officegen for Word Document
- Make the generated document read-only of password protected?
- Can I set a password to access Word
- How to add Number Bullet lists and Sub Number Bullet list
- How can i set auto-warp attribute to a column or cell in Excel file?
- Suggestion:Footer supports inserting tables
- May I ask if it is possible to add a background color to the Word document
- Can a transformation map be created with this library?
- How to Add Subscripts to Table Cells?
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 officegen.