Click or drag to resize

PageDraw Method (Graphics)

Draws the page content using default page boundary and render settings.

Namespace:  Atalasoft.Imaging.Codec.Pdf
Assembly:  Atalasoft.dotImage.PdfReader (in Atalasoft.dotImage.PdfReader.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
public Summary Draw(
	Graphics graphics
)

Parameters

graphics
Type: System.DrawingGraphics
Graphics object to which content is drawn.

Return Value

Type: Summary

[Missing <returns> documentation for "M:Atalasoft.Imaging.Codec.Pdf.Page.Draw(System.Drawing.Graphics)"]

Examples
C#
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);
[New Example] (Visual Basic)
Dim page As Page = document.Pages(selectedPage];

Dim DPI As Double = 300
bitmap = New Bitmap( _
  (page.Width / 72 * DPI), _ 
  (page.Height / 72 * DPI))
Dim graphics As Graphics = Graphics.FromImage(bitmap)

Dim scale As Double = DPI / 72
graphics.ScaleTransform(scale, scale)

page.Draw(graphics)
See Also