Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Commit

Permalink
Add posibility for widescreen PPTX
Browse files Browse the repository at this point in the history
  • Loading branch information
Trekky12 committed Oct 7, 2020
1 parent 43eee66 commit 6dfad07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cli/sozi-to-pptx.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ cmd.option("-o, --output <file>", "Output file")
.option("-r, --resolution <number>", "Pixels per width/height unit (defaults to 72)", 72)
.option("-i, --include <list>", "Frames to include (defaults to 'all')", "all")
.option("-x, --exclude <list>", "Frames to exclude (defaults to 'none')", "none")
.option("--wide", "Widescreen presentation")
.parse(process.argv);

// The input file name is the last argument
Expand Down
5 changes: 5 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ exports.convertToPPTX = function (inputFileName, options) {
pptx.on("error", function (err) {
console.log(err);
});

if(options.wide){
pptx.setWidescreen(true);
}

fs.readdirSync(tmpDir).forEach(function(file) {
var slide = pptx.makeNewSlide();
slide.addImage(path.join(tmpDir, file), {y: 0, x: 0, cy: "100%", cx: "100%" });
Expand Down

0 comments on commit 6dfad07

Please sign in to comment.