Skip to content

Can you use the HTML-to-PPTX on an arbitrary webpage? #1117

Answered by gitbrent
pearl6527 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you can actually do this.

const script = document.createElement("script");
script.src = "https://cdn.jsdelivr.net/gh/gitbrent/[email protected]/dist/pptxgen.bundle.js";
script.onload = function () {
	const pptx = new PptxGenJS();
	pptx.tableToSlides('tableTest');
	pptx.writeFile();
};
document.getElementsByTagName("head")[0].appendChild(script);

Open an F12/DevTools window and use the JavaScript above with a given table id (or edit the table's HTML and add one if needed - i tested this with wikipedia and it worked).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pearl6527
Comment options

Answer selected by pearl6527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants