Page 1 of 1

Adding an image but specify the image size

Posted: Sun Dec 30, 2012 6:43 am
by JNewhouse
Hi Loic,
We are using the AddEmbeddedImageAnotInteractive() method to allow the user to drop an image file onto a PDF page. The problem is that when using the mouse to draw the location and size of the image to be embedded, the size drawn is not always accurate, so the resulting image is stretched. The embedded image file must be accurate in size for our application.

We tried using the AnnotationManager to programatically embed the image, and this will allow us to embed the image with the correct size, however the user isn't then able to select and *move* the image file.

So to be clear, we need to control the size of the embedded image, but allow the user to select and *move* the image file to align it correctly on the PDF page.

Can you please provide instructions for accomplishing this? it would be ideal if there was an overload of the AddEmbeddedImageAnnotInteractive() method with an extra parameter that determined if the image were stretched or clipped, however if you have a workaround i will take it.

thank you for your help!!

Re: Adding an image but specify the image size

Posted: Tue Mar 25, 2014 10:14 am
by bjcam
I would like to do this, too. I am struggling to programmatically add an annotation by clicking on the page, rather than allowing the user to draw the annotation to any size.
Is there any help on this? I have searched the documentation and looked at the samples, but can't seem to get it to work with the AnnotationManager.

Thanks.