I am using mupdf for rendering pdf in my android app. The issue that I'm facing is that even while reading a pdf with transparent background, it is showing white background. How can I rectify this error ? Any help will be appreciated.

有帮助吗?

解决方案

For a pdf to have transparent background with MuPDF go to the C program file("mupdf.c") remove the code that sets the background to white and replace it with fz_clear_pixmap(ctx, pix);

ie, replace fz_clear_pixmap_with_value(ctx, pix, 0xff); with fz_clear_pixmap(ctx, pix);

after editing rebuild the ndk, and use it in your android app.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top