LEADTOOLS PDF (Leadtools.Pdf assembly)
LEAD Technologies, Inc

Bounds Property (PDFObject)






Gets or sets the bounding rectangle of the object.
Syntax
public PDFRect Bounds {get; set;}
'Declaration
 
Public Property Bounds As PDFRect
'Usage
 
Dim instance As PDFObject
Dim value As PDFRect
 
instance.Bounds = value
 
value = instance.Bounds
public PDFRect Bounds {get; set;}
 get_Bounds();
set_Bounds(value);
public:
property PDFRect Bounds {
   PDFRect get();
   void set (    PDFRect value);
}

Property Value

A PDFRect structure that contain the bounding rectangle of the object in PDF units (1/72 of an inch and bottom left). Default value is an empty PDFRect with all values initialized to 0.
Remarks

The bounds of an object is read in PDF units, these are in 1/72 of an inch and a are bottom-left on the page. In other words, the 0,0 location is the bottom left corner of the page. To convert these units to inches or pixels in top-left coordinates, use the PDFDocumentPage.ConvertRect method as follows:

    
            PDFRect coords = pdfObject.Bounds;
            // Convert to pixels:
            PDFRect pixels = page.ConvertRect(PDFCoordinateType.Pdf, PDFCoordinateType.Pixel, coords);
            

  

For more information, refer to PDF Coordinate System.

If this object is a text item (ObjectType is PDFObjectType.Text), then the Bounds property contains the exact bounding box of the character in Code. This box does not include the internal or external leading spaces adding by the font used. To obtain this information, you must use the values of the TextProperties property.

If this object is an image item (ObjectType is PDFObjectType.Image), then the Bounds property contains the bounding box of the image in the PDF page. The example of PDFObject shows how to extract the image data from the PDF page.

Example

For an example, refer to PDFObject.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PDFObject Structure
PDFObject Members
PDF Coordinate System

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.