shape.getGeometry().shape('trapezoid')Or access the XML directly to do anything that the OpenXML allows, even if it's not yet in the high-level API:
shape.child('a:prstGeom').attr('prst', 'trapezoid')This way, you're never at the mercy of another development team to add an obscure feature that you simply require.
// read existing template fs.readFile(INFILE, function (err, data) { if (err) throw err; var pptx = PPTX(); pptx.load(data, function (err) { // create new slide from layout var slide = pptx.addSlide("slideLayout3"); // edit shape text in place slide.getShapes(0).text("Revised text"); // create new shape var shape = slide.addShape(); shape.text("72pt Red Arial"); shape.getShapeProperties() .x(PPTX.emu.inch(1)) .y(PPTX.emu.inch(2)) .cx(PPTX.emu.inch(7)) .cy(PPTX.emu.inch(1)) .prstGeom('rect') .setNoFill(true) .setNoEffects(true) shape.getStyle() .fillSchemeColor('lt2') .fontSchemeColor('accent2'); // detailed control of text shape.getTextBody() .getParagraphs()[0] .getRuns()[0].getProperties() .size(7200) .setTypeface('Arial') .italic('1') .bold('1') .underline('sng') .strike('sngStrike') shape.getTextBody().getBodyProperties() .wrap('none') .attr('rtlCol', '0') // direct XML .anchor('right') // Use JSZip API to stream/zip/save... fs.writeFile(OUTFILE, pptx.toBuffer());
Generate native PPTX in your template