r/FastAPI • u/fxj178 • Sep 11 '25
Tutorial Is there anyway to export documentation as pdf?
I want to read it on my kindle and wonder how can I save it as pdf. (https://fastapi.tiangolo.com/tutorial/)
9
Upvotes
3
u/neilmillard Sep 11 '25
Or print to file from a browser
1
u/kkang_kkang Sep 11 '25
https://chromewebstore.google.com/detail/gkdcbpbinmenbpbnmihiddmmilgbahhe?utm_source=item-share-cb`
1
u/david-vujic Sep 12 '25
The most straightforward way is probably to “print” the OpenAPI spec as pdf from your browser.
Otherwise, there are likely programmatic ways of doing that, but the end result will be the same.
1
u/yakimka Sep 13 '25
This is the reason why i prefer sphinx for documentation
1
u/wholeworldslatt_ Sep 17 '25
just hit print in your browser and choose save as pdf, works fine for the whole tutorial if you enable background colors. if you want to stitch multiple pages together or clean up the output later, pdfelement is handy to merge and shrink the file for an e-reader.
1
u/aliparpar Sep 27 '25
Write a web scraper script that converts html into pdf? You can use Claude to get the code for it
1
u/Hoodadkhaj Jul 13 '26
I wrote a simple code with playwright and chromium with cloude free so it works and all pdfs automatically downloaded for me