简体   繁体   中英

Android PDFRenderer not rendering annotations on PDF

I have a PDF with ink annotations that I want to render, but the ink annotations does not show, only the pdf without the annotations. If I use a lib to open the pdf I can see the PDF with its annotations. I would like to show a thumbnail of the pdf's first page in a list view and therefore the need to render the pdf to bitmap.

Is there anyone else that have this issue or that can render pdf's with the annotations on them using PDFRenderer?

I've experimented with Android's PDFRenderer to use it in PSPDFKit (a commercial PDF SDK) and it seems that it's mostly designed for printing, and doesn't take annotations into account.

We ended up building our own renderer and annotation drawing code. It's possible that Android's PDFRenderer will render annotations if they have an appearance stream. (Same for Highlight, Stamp, and Forms)

The concept of Appearance Streams is explained here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM