We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

positioning elements

I'd like to set the position of a new element regarding the position of the element before. How can I determine the position of the last element to calculate the position of the new one?

3 Replies

TE Thiruvenkadam E Syncfusion Team July 24, 2009 12:26 PM UTC

Hi Andreas,

Thanks for your interest in Syncfusion products.

How to determine the position of the last element

Kindly refer the below code snippet which helps to determine the position of the last element.

[C#]

//Create a new image.
PdfBitmap bmp = new PdfBitmap(@"..\..\Data\Image1.png");
//Set the initial position
PointF point=new PointF(0,0);
//Create a layout format and draws an image
PdfLayoutResult result = bmp.Draw(page, point);
//Create a new image.
bmp = new PdfBitmap(@"..\..\Data\Image2.png");
//Set the position of a new image.
point = new PointF(result.Bounds.Left, result.Bounds.Bottom+20);
//Draws an image.
result = bmp.Draw(page, point);

Please do find the sample from the below specified location which demonstrates how to determine the position of the last element and let me know if this helps.

http://files.syncfusion.com/support/pdf.Windows/F88434/PDFImages.zip

Regards,
Thiru


AH Andreas Hirtzel July 26, 2009 08:45 PM UTC

Hi Thiru,

works fine. Thank you!


SS Sri Subhashini M Syncfusion Team July 28, 2009 11:33 AM UTC


Hi Andreas,

Glad to hear that it works great. Please let me know if you have any other queries.

Regards,
Suba

Loader.
Live Chat Icon For mobile
Up arrow icon