Annotation RenderToBmp is not working - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: Annotation RenderToBmp is not working

Annotation RenderToBmp is not working 3 years 4 months ago #9190

  • PDFActivation
  • PDFActivation's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • 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 3 years 4 months ago #9196

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
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