Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

Annotation RenderToBmp is not working

More
10 years 8 months ago #9190 by PDFActivation
I have to show all annotations from current page in to listview.
I am trying to render annotation to bitmap object using RenderToBmp(bitmap). Method returns true after render but annotation is not rendered on bitmap.
Bitmap bitmap = Bitmap.createBitmap(100, 100, Config.ARGB_8888);
bitmap.eraseColor(0xFFFFFFFF);
annot.RenderToBmp(bitmap);
ivImage.setImageBitmap(bitmap);
PDF sdk : 3.4
More
10 years 8 months ago #9196 by support
I suggest you to try creating a bmp container like that below

float[] r = m_annot.GetRect();
int w = Math.abs((int) (r[3] - r[0]));
int h = Math.abs((int) (r[2] - r[1]));
Bitmap bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
bitmap.eraseColor(0xFFFFFFFF);
m_annot.RenderToBmp(bitmap);

We've tried with a bunch of different annotations and wasn't experiencing the issue you're saying.
Time to create page: 0.385 seconds
Powered by Kunena Forum