Skip to content

Can I make a web app that does marp-cli html,pdf,pptx conversion on the client side? #526

Answered by yhatt
link2004 asked this question in Q&A
Discussion options

You must be logged in to vote

Marp CLI has been designed for server side JavaScript runtimes such as Node.js, and you cannot use CLI in the client-side JavaScript (on the web browser).

You can use Marp Core to convert Markdown into HTML on the client JS. Probably you may have to bundle the package to target for web browsers, by using JavaScript bundler (e.g. Webpack, Vite, etc).

Implementing perfect conversion for PDF, PPTX, and other formats on only client JavaScript is extremely difficult, because Marp CLI is depending on Puppeteer (provides API for controlling browser process itself).

Replies: 1 comment 1 reply

Comment options

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

Answer selected by yhatt
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