PageDraw Method (Graphics) |
Namespace: Atalasoft.Imaging.Codec.Pdf
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);
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)