Posted by a ceTe Software moderator
Hello,
Thanks for sending requested information to our support team. You are getting this behavior because you are setting wrong X and Y positions for the image page element while adding to the PDF dynamically through Placeholder. Please make sure that you are setting X and Y to value zero. Also set the width and height for the image page element as of placeholder. Below is the sample code for adding image in LaidOut event. Similarly you will need to set the width, height, X and Y properties for Image in all the events where in your are adding Image.
private void phSeal_LaidOut(object sender, PlaceHolderLaidOutEventArgs e)
{
System.Drawing.Bitmap image = (Bitmap)Bitmap.FromFile("Path for an image");
ceTe.DynamicPDF.PageElements.Image rect = new ceTe.DynamicPDF.PageElements.Image(image, 0, 0, 1);
rect.Width = e.ContentArea.Width;
rect.Height = e.ContentArea.Height;
e.ContentArea.Add(rect);
}
Thanks,
ceTe Software Support Team.