Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Annotation RenderToBmp is not working 8 years 9 months ago #9190

  • PDFActivation
  • PDFActivation's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
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

Please Log in or Create an account to join the conversation.

Annotation RenderToBmp is not working 8 years 9 months ago #9196

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 692
  • Thank you received: 59
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.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum