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

Image Moving

More
IP: 103.97.240.35 7 years 2 weeks ago - 7 years 2 weeks ago #14306 by [email protected]
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.
Last edit: 7 years 2 weeks ago by [email protected].
More
IP: 111.196.247.186 7 years 2 weeks ago #14308 by radaee
Replied by radaee on topic Image Moving
PageContent is not editable, behind all annotations.
you can using Annotation instead, after annotation added to page, you can move/delete Bitmap annotation.
Time to create page: 0.399 seconds
Powered by Kunena Forum