How to extract an annotation appearance to an image file

Q: How can I extract an annotation appearance to an image file? For example, I have an ink annotation I would like to save as a jpg.

A: One way to achieve that is to use PDFDraw. Once you get the annotation object (either by traversing the document - http://www.pdftron.com/pdfnet/samplecode.html#Annotation - or by other means) you can:

Page tempPage = doc.pageCreate();

tempPage.annotPushBack(annot);
tempPage.setMediaBox(annot.getRect());

PDFDraw pdfDraw = new PDFDraw();
pdfDraw.export(tempPage, “/mnt/sdcard/annot.jpg”, “JPEG”);

If you are working with stamp annotations, you might also want to check this post: https://groups.google.com/d/msg/pdfnet-sdk/3o_dQ89Kpu8/bwSxIGjf8k8J