w3nl / ppt-png

Convert ppt to png
MIT License
45 stars 7 forks source link

doesn't work #1

Closed toto6321 closed 5 years ago

toto6321 commented 5 years ago

Here is my demo.

const Converter = require('ppt-png')

new Converter({
    files: ['a.pptx'],
    output: 'output/',
    invert: false,
    logLevel: 2,
    callback: function(data){
        console.log(data.files, data.success, data.files, data.time)
    }
}).run()

Then I got:

[11:43:06] ~/test_ppt-png $ node index.js 
File: 1, time: 1 ms, total time: 1ms
Average: 1ms/file
Convert: a.pptx
Converted to pdf
Pdf saved: output/a.pdf
Cannot convert: a.pptx
Total time: 517ms for 1 files
[ 'a.pptx' ] [] [ 'a.pptx' ] 517

Apparently, it doesn't work as expected. My node is 6.5.0 and OS is Ubuntu 18.

The demo pptx is attached.

a.pptx

w3nl commented 5 years ago

Thanks for your information, I will check it soon.

PieterWigboldus commented 5 years ago

Meaby this will help: https://stackoverflow.com/a/52661288 pdf2image package failed to convert the pdf to an image. That package use imagemagick to convert.

You can see more usefull debug information if you just show all information from data in the console.

const Converter = require('ppt-png')

new Converter({
    files: ['a.pptx'],
    output: 'output/',
    invert: false,
    logLevel: 2,
    callback: function(data){
        console.log(data)
    }
}).run()
AlexanderKozhevin commented 2 years ago

const Converter = require('ppt-png')

new Converter({ files: ['peka.pptx'], output: 'output/', invert: false, logLevel: 2, callback: function(data){ console.log(data.files, data.success, data.files, data.time) } }).run()

TypeError: Converter is not a constructor
w3nl commented 2 years ago

Thanks, i'll check. On version 1.1.9?

AlexanderKozhevin commented 2 years ago

@w3nl @PieterWigboldus yes 1.1.9

w3nl commented 2 years ago

@AlexanderKozhevin I've found this issue, check: https://github.com/w3nl/ppt-png/issues/44#issuecomment-1058202531