PDFReaderControls.NET Professional Type Reference

Page.Draw Method (Graphics)

Draws the page content using page boundary 'Default'.

public void Draw(
   Graphics graphics
);

Parameters

graphics
Graphics object to which content is drawn.

Remarks

Page.Draw assumes a coordinate sysem where each unit equals a point (1/72 inch). The PageUnit property of the supplied graphics instance indicates how each unit maps onto the actual device. Page.Draw uses this information to produce the most appropriate result, and in particular the resolution of rendered images:

Example

 Page page = document.Pages[selectedPage];

 const float DPI = 300;
 bitmap = new Bitmap( 
   (int) ( page.Width / 72 * DPI ), 
   (int) ( page.Height / 72 * DPI ) );
 Graphics graphics = Graphics.FromImage( bitmap );

 float scale = DPI / 72;
 graphics.ScaleTransform( scale, scale );
        
 page.Draw( graphics );

See Also

Page Class | TallComponents.PDF Namespace | Page.Draw Overload List