Placeholders don't show

Placeholders don't show

Forum member · Feb 10, 2012
I have created a report that contains 3 placeholders. One inserts an image that is generated on the fly. The other two are used fro static images that are contained in a folder. The image generated on the fly is displayed correctly. The other two do not display. Each has a seperate LaidOut event. Any thoughts?

Re: Placeholders don't show

Support · Feb 10, 2012
Hello, Please send over the following information to [^a|mailto:support@cete.com|opennewwindow|support@cete.com^] so we can look into it further. 1.Version of DynamicPDF API. 2.Code used to add images to the place holder 3.Copy of static images. 4.Dplx file. 5.Output pdf Thanks, ceTe Software Support Team.

Re: Placeholders don't show

Support · Feb 13, 2012
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.

Re: Placeholders don't show

Forum member · Feb 13, 2012
Thank you very much. That worked great!