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

TOPIC:

Image Moving 5 years 1 month ago #14306

  • rishikesh@appristine.in
  • rishikesh@appristine.in's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 24
  • Thank you received: 0
hello Team,
I added image to PDF by using following code from knowledge base,

File file = new File(Environment.getExternalStorageDirectory(), "/test_image.jpg");
Bitmap bitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
Page page = document.GetPage(0);
PageContent pageContent = new PageContent();
pageContent.Create();
pageContent.GSSave();
com.radaee.pdf.Matrix mat = new com.radaee.pdf.Matrix(200, 112.5f, 100, 300);
pageContent.GSSetMatrix(mat);
mat.Destroy();
Document.DocImage docimage = document.NewImage(bitmap, true);
ResImage rimage = page.AddResImage(docimage);
pageContent.DrawImage(rimage);
pageContent.GSRestore();
page.AddContent(pageContent, false);
pageContent.Destroy();
page.Close();
document.Save();

But I cannot move the image even cannot delete it. I wanted to move and delete image as other annotations movements.
Please help me.

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

Last edit: by rishikesh@appristine.in.

Image Moving 5 years 1 month ago #14308

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
PageContent is not editable, behind all annotations.
you can using Annotation instead, after annotation added to page, you can move/delete Bitmap annotation.

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

  • Page:
  • 1
Powered by Kunena Forum