markvincze / sabledocs

Simple static documentation generator for Protobuf and gRPC contracts.
MIT License
45 stars 12 forks source link

PDF documentation generation #44

Open gmabey opened 7 months ago

gmabey commented 7 months ago

This should be considered a low-priority feature request. I've been using the --print-to-pdf switch on google chrome to generate a PDF document of the sabledocs generated HTML pages. I just do it as a CI/CD step on index.html and then on each of the pages corresponding to my multiple .proto files, then I use pdfunite to concatenate them together. This works. The down-sides are that the links don't work, and the copyright footer gets repeated more often than it needs to be. Also, I see that chrome picks a different font size for printing based on the content. But it works.

I'm just creating this issue to plant the seed of an idea that could make this much better. If there was a "single_page" mode in sabledocs.toml that would result in all of the content being put into a single .html file, and if (in that same mode) all links (except for the repository-url links of course) were local to the page, it would make this setup 10x better.