XRect String Property. The rect as a string. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

 

Type Default Read Only Description
[C#] string

[Visual Basic]
String
"0 0 0 0" No The rect as a string.

 

   

Notes
 

Allows you access to the rect as a string.

When working in standard PDF coordinates the format of the string is "left bottom right top". When working with top-down coordinates the format of the string is "left top right bottom".

You can use the following page sizes as shortcuts when assigning a string value to an XRect:

Paper Size Width in Points Height in Points
A3 842 1190
A4 595 842
A5 420 595
B4 729 1032
B5 516 729
Letter 612 792
Legal 612 1008
Tabloid 792 1224
Ledger 1224 792
Statement 396 612
Executive 540 720
Folio 612 936
Quarto 610 780
10x14 720 1008

 

   

Example
 

The following code.

[C#]
XRect rc = new XRect();
rc.String = "10 10 200 100";
Response.Write("Width = " + rc.Width.ToString());
Response.Write("<br>");
Response.Write("Height = " + rc.Height.ToString());

[Visual Basic]
Dim rc As XRect = New XRect()
rc.String = "10 10 200 100"
Response.Write("Width = " + rc.Width.ToString())
Response.Write("<br>")
Response.Write("Height = " + rc.Height.ToString())

Produces the following output.

Width = 190
Height = 90