Bug 708108

Summary: Feat. Req.: Markdown Text File Support
Product: MuPDF Reporter: Spectas <abo>
Component: appsAssignee: MuPDF bugs <mupdf-bugs>
Status: UNCONFIRMED ---    
Severity: normal CC: robin.watts
Priority: P2    
Version: unspecified   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---

Description Spectas 2024-10-26 14:50:56 UTC
Thank you for MuPDF! The quality and flexibility of this renderer is remarkable, especially for devices with constrained processing power like e-ink readers (mine is a PocketBook Reader Lux 4). I’d like to propose markdown file support as a new feature to expand the document formats MuPDF can handle, particularly for text and technical documentation, but also there's nice Browser addons like "MarkDownload" which download complex websites into a nice markdown formatted file.

Benefits: Markdown is a popular, lightweight format that provides enhanced readability for plain text files through structured formatting—headers, bold, italics, lists, links. Many users would benefit from seeing markdown support added to MuPDF, allowing it to display these files with readable, user-friendly formatting.

Initial Implementation Suggestion:
To start, a limited scope could focus on basic formatting elements like headers, bold, italics, lists, highlighting, and links. Using a lightweight markdown parser, such as cmark, MuPDF could convert markdown to an internal format or HTML for rendering. This would provide the essential markdown structure for a large portion of users.

Future Additions:
Potential future features could include support for math formulas, images.

Thank you for considering this suggestion, and for your work on such an exceptional document viewer!
Comment 1 Robin Watts 2024-10-26 23:47:22 UTC
Yes, markdown support would be great. Thanks for volunteering!

The document handler system is deliberately extensible so that people can add new features.

I suspect that one of the easiest ways to get Markdown support into MuPDF would be to find/write a Markdown -> HTML converter, and leverage the existing HTML support.