Placeholders don't show

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v6)  /  Placeholders don't show

DynamicPDF CoreSuite for .NET (v6) Forum

 Feb 10 2012 11:07 AM
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?
 Feb 10 2012 3:27 PM
Posted by a ceTe Software moderator
Hello,

Please send over the following information to 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.
 Feb 13 2012 1:05 PM
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.
 Feb 13 2012 1:15 PM
Thank you very much.  That worked great!

All times are US Eastern Standard time. The time now is 10:34 PM.