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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set or increase PdfLayoutResult bounds (Y value)

Thread ID:





109385 Jun 11,2013 12:32 AM UTC Jun 18,2013 04:51 AM UTC WinForms 3
Tags: PDF
Eric Yang
Asked On June 11, 2013 12:32 AM UTC


Is there a way to set the bounds manually?

for example:

PdfLayoutResult result = new PdfLayoutResult();
result.Bounds.Y = result.Bounds.Y + 100;

The mouse tooltip in Visual Studio says Bounds.Y can be Get or Set with float value. But if I do the above, it'll say result.Bounds is read-only.

I'm trying to create a 'white-space" below DrawRectangle. So the next element can reference PdfLayoutResult.Bounds as its starting point.



KarthikeyanC [Syncfusion]
Replied On June 13, 2013 04:48 AM UTC

Hi Eric,

Thank you for your interest in Syncfusion Products.


Bound is a variable of type “System.Drawing.RectangleF” so the value Bounds.Y is shown that it can be get and set.

But the Property “Bounds” itself is  Read-only you can see it by using Mouse tooltip.


Any way to get the white space after the rectangle, you may increase the value of the starting point of the second element instead you increase the bounds of the first drawn element.

Please refer the sample code snippet below.

PdfLayoutResult result = element.Draw(page, new RectangleF(0, 0, page.Graphics.ClientSize.Width / 2, 200));

g.DrawRectangle(brush, new RectangleF(0, result.Bounds.Bottom + 100, g.ClientSize.Width, 30));  //Leaves 100 points space between last drawn element and new rectangle



Please let us know if you have any concern.






Eric Yang
Replied On June 13, 2013 04:18 PM UTC

Hi Karthikeyan,
Thanks for the reply. However, I'm looking for variable height of rectangleF, not a hardcoded 100 gap.
Please see layout I attached with message.
I'm trying to achieve two things.
1. Draw a rectangle with a border to enclose two tables that have variable height
2. And find out the starting point of my next element "some texts start here..."
I tried PDFGrid object which returns GridLayoutResult with bottom bounds. So maybe I can try to work my way around that. But PDFGrid doesn't allow me to hide the table header, so I'm back in using PDFLightTable.


KarthikeyanC [Syncfusion]
Replied On June 18, 2013 04:51 AM UTC

Hi Eric,

Thank you for your update.


I have attached a sample solution which satisfies your requirements.

Please refer the sample, and let me know if you have any concern.








This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon