Documenting Code within Blocks / Exporting Code as Images or PDF

The current blocks editor offers very limited documentation features, and once the code gets longer, it’s hard to scroll around and follow the logic. While some blocks let you add comments, but this option is too limited to clearly explain the purpose of the implementation.
Is there any way to export the blocks code as a PDF or images for documentation purposes?