public GetRight ( float margin ) : float | ||
margin | float | a margin |
return | float |
// Create a new rectangle with a width of 100 and a height of 50 Rectangle rectangle = new Rectangle(0, 0, 100, 50); // Set the x-coordinate of the rectangle's left edge to 50 rectangle.Left = 50; // Get the x-coordinate of the rectangle's right edge and print it to the console Console.WriteLine(rectangle.GetRight());
// Create a new rectangle with a width of 200 and a height of 100 Rectangle rectangle = new Rectangle(0, 0, 200, 100); // Create a new document with the rectangle's width and height Document document = new Document(rectangle); // Get the x-coordinate of the right edge of the document's page and print it to the console Console.WriteLine(document.PageSize.GetRight());This example creates a rectangle with a width of 200 and a height of 100, uses it to create a new PDF document with the same dimensions, and then uses the GetRight() method on the document's PageSize property to get the x-coordinate of the right edge of the page. Both of these examples use the iTextSharp package/library.
public GetRight ( float margin ) : float | ||
margin | float | a margin |
return | float |