Open DeveloperMCD opened 8 months ago
I'm using the straight sample code from the website. Can't get it working in React Native.
import pptxgen from "pptxgenjs"; let pptx = new pptxgen();
let slide = pptx.addSlide(); slide.addText("React Demo!", { x: 1, y: 1, w: 10, fontSize: 36, fill: { color: "F1F1F1" }, align: "center" });
pptx.writeFile({ fileName: "react-demo.pptx" }) .then((fileName) => { logWithTime('PPTX file written to phone: ${fileName}', 'pptx'); }) .catch((err) => { logWithTime(err, 'pptx'); });
Versions I'm using: "react": "18.2.0", "react-native": "0.72.4", "jetifier": "^2.0.0", "pptxgenjs": "^3.12.0",
Node: v21.2.0
Getting error back from writeFile promise:
[Error: blob is not supported by this platform]
I'm using the straight sample code from the website. Can't get it working in React Native.
import pptxgen from "pptxgenjs"; let pptx = new pptxgen();
let slide = pptx.addSlide(); slide.addText("React Demo!", { x: 1, y: 1, w: 10, fontSize: 36, fill: { color: "F1F1F1" }, align: "center" });
pptx.writeFile({ fileName: "react-demo.pptx" }) .then((fileName) => { logWithTime('PPTX file written to phone: ${fileName}', 'pptx'); }) .catch((err) => { logWithTime(err, 'pptx'); });
Versions I'm using: "react": "18.2.0", "react-native": "0.72.4", "jetifier": "^2.0.0", "pptxgenjs": "^3.12.0",
Node: v21.2.0
Getting error back from writeFile promise:
[Error: blob is not supported by this platform]