Rust: Make a pdf version of the std api reference.

Created on 6 May 2019  路  9Comments  路  Source: rust-lang/rust

C-feature-request T-doc T-rustdoc

Most helpful comment

@catastrop Please stop spamming issues, it will not get this resolved any faster. Rustdoc is not capable of outputting to PDF natively, it can only create the HTML-based documentation that is already available.

Like someone already said, you can try using Pandoc to convert the documentation, but the result might not look very good.

The only way to properly resolve this is by adding first-class PDF support to rustdoc, which, given the current architecture and state of rustdoc, is going to be very difficult. The rustdoc team is also only 4 people who are busy with other issues.

All 9 comments

You can use Pandoc to convert these html version document files.

@catastrop a more detailed description would be helpful though. Do you want something like doxygen which gives you a multi-hundred page PDF?

@rustbot modify labels: T-doc C-enhancement

It reminds me a bit of this issue: #20866 which about generating epub and pdf versions of the Book. But maybe the idea behind it can be used for this as well?

@rustbot modify labels: -C-enhancement +C-feature-request

@catastrop Please stop spamming issues, it will not get this resolved any faster. Rustdoc is not capable of outputting to PDF natively, it can only create the HTML-based documentation that is already available.

Like someone already said, you can try using Pandoc to convert the documentation, but the result might not look very good.

The only way to properly resolve this is by adding first-class PDF support to rustdoc, which, given the current architecture and state of rustdoc, is going to be very difficult. The rustdoc team is also only 4 people who are busy with other issues.

@catastrop I don't get your arguments. Rustdoc can already be access offline, because the doc is always installed along with the standard library and the compiler. Always. Just use rustup doc --std and it will be opened in your browser right away. Locally (remove your network cable and see that it still works)

Note, that the code for generating PDF files from Markdown already exists, it just requires a bit of integration: https://github.com/Geemili/mdproof

IMO this doesn't really make sense to add to Rustdoc. The way I see this happening is by implementing the JSON backend (https://github.com/rust-lang/rfcs/pull/2963) and then someone in the community can then make a PDF renderer using the JSON.

Was this page helpful?
0 / 5 - 0 ratings