Download the powerpoint by visiting this url: https://stevekrouse-powerPointExample.web.val.run/download

Readme
Fork
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pptxgen from "npm:pptxgenjs";
export let powerPointExample = async (req: Request) => {
if (!req.url.includes("download")) return Response.json("ok");
let pres = new pptxgen();
let slide = pres.addSlide();
let textboxText = "Hello World from PptxGenJS!";
let textboxOpts = { x: 1, y: 1, color: "363636" };
slide.addText(textboxText, textboxOpts);
const output = await pres.stream();
return new Response(output, {
headers: {
"Content-Type": "application/vnd.ms-powerpoint",
},
});
};
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.