2

I was working on a lightweight pdf viewer, and I wanted the size to be of the range of 5 MBs, I am using mupdf , but the compiled .so file itself is around 16.6 MBs,

Is there a way to compile mupdf with only pdf support and not the others like xps, images, etc. Like this app on google play, the file of .so file is just 3 MBs https://play.google.com/store/apps/details?id=de.geraldthaler.octopuspdf,

Any help will be greatly appreciated.

2 Answers 2

1

I figured, It was because of the font packs, compiling without extra font packs generates very small .so's

Sign up to request clarification or add additional context in comments.

Comments

0

If this is still relevant: There is a configuration file In MuPDF source that lets you throw out features before you generate the library, called config.h located in directory mupdf/include/fitz. By setting the appropriate #define statements, XPS, EPUB, etc. can be opted out. The biggest space saver is however opting out certain fonts. In essence you can restrict your library to PDF's Base-14 (Helvetica, Times-Roman, Courier, Symbol and ZapfDingbats) fonts. You also can opt out support for various image format support. Taking all that together should bring you down well below 5 MB.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.