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 #372

Open
anibal-aguila opened this issue Jan 6, 2025 · 2 comments
Open

export to PDF #372

anibal-aguila opened this issue Jan 6, 2025 · 2 comments

Comments

@anibal-aguila
Copy link

Hi, great project and excellent documentation!
I’m wondering if there is a way to export all the documentation (e.g., docs-src/0.6) to a PDF file that can be read on an e-ink device. Since I spend a lot of hours in front of a screen, this would help reduce my exposure to screen light.

Thanks in advance!

@Andrew15-5
Copy link
Contributor

We can make an adapter to export to PDF through Typst, but right now it's probably not worth it. And Typst doesn't yet have HTML export. Maybe later this all can work out somehow.

There could be some other libraries to convert HTML to PDF, but AFAIK this is hard and there is hardly anything available for this.

With Typst, since it's fully written in Rust, there is possibility to map Dioxus's Node tree to Typst's AST or something like that, and then it should just work.

@jkelleyrtp
Copy link
Member

jkelleyrtp commented Jan 8, 2025

One option would be to render every mdbook page on a single web page. You could then user the browser's print functionality.

For example, the w3 specs are one large page: https://www.w3.org/TR/wasm-core-1/

Screenshot 2025-01-07 at 6 32 22 PM

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

No branches or pull requests

3 participants