Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export to PDF #8

Open
ynohat opened this issue Mar 28, 2019 · 6 comments
Open

export to PDF #8

ynohat opened this issue Mar 28, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@ynohat
Copy link
Owner

ynohat commented Mar 28, 2019

currently recommended approach

reveal packager: use decktape
typora packager: use chrome+print to pdf

would be nice to have an integrated approach

@ynohat ynohat added the enhancement New feature or request label Mar 28, 2019
@lukaszczerpak
Copy link
Contributor

lukaszczerpak commented Mar 28, 2019

typora packager is used for labs typically and html format it generates is the best to share with others, as pdf can mess up especially if there are fragments to copy/paste to terminal (non-printable characters, line breaks, etc..).
On a separate note I've heard good opinions about https://wkhtmltopdf.org (another option for typora I believe).

@ynohat
Copy link
Owner Author

ynohat commented Mar 30, 2019 via email

@lukaszczerpak
Copy link
Contributor

I have good results with puppeteer for typora packager. Zero issues, great results.

@ynohat
Copy link
Owner Author

ynohat commented Jun 16, 2020

@lukaszczerpak thanks a lot for that.

Currently I'm getting reports that sometimes mdtk is not easy to install (lots of errors related to sharp and canvas that have specific install prereqs, can't remember the details.

Puppeteer adds chromium to the dependencies, and will only serve the booklet/typora packager (at least as a quick thing, I think we could implement a puppeteer based renderer for revealjs as well, but that will be a much larger effort).

Can you share your approach for rendering booklets using puppeteer outside of mdtk here?

@lukaszczerpak
Copy link
Contributor

I have puppeteer-cli package installed (which requires puppeteer as a dependency), then I simply run the following:

puppeteer print lab1.html lab1.pdf

@ynohat
Copy link
Owner Author

ynohat commented Jun 16, 2020

Right, so npx puppeteer print lab1.html lab1.pdf should work even without adding it to the dependencies of the package.

Let me think about this a little bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants