FB2 libraries for C/C++
- MuPDF opens FB2 files like any other document: it lays out the book into pages, shows the cover, reads the table of contents from the sections, extracts text and converts to PDF. AGPL-3.0 or commercial.
To read FB2 metadata or structure in C or C++ without rendering, use an XML parser such as libxml2 or pugixml: FB2 is a single XML file, and the metadata is in description/title-info. Remember to honor the encoding in the XML declaration (often windows-1251 in older files).
- MuPDF MuPDF opens FB2 (FictionBook) e-books in C: lay out pages, extract text, read title, author and table of contents, render the cover.