Q quansofts Member Dec 9, 2022 #1 Hi All, I used below code to print a bitmap captured from a webview to printer. It works but the size of printed bitmap is different in different devices that have different screen resolution. In high resolution phone the printed image is showed good, but in lower resolution phone the image is too large and go out of the paper. How can we print a bitmap at same size in all devices? Many thanks for your help Code: Copy Dim bmp As Bitmap bmp=WebView1.CaptureBitmap bmp = bmp.Resize(bmp.Width, bmp.Height * Ydpi / Xdpi, True)
Hi All, I used below code to print a bitmap captured from a webview to printer. It works but the size of printed bitmap is different in different devices that have different screen resolution. In high resolution phone the printed image is showed good, but in lower resolution phone the image is too large and go out of the paper. How can we print a bitmap at same size in all devices? Many thanks for your help Code: Copy Dim bmp As Bitmap bmp=WebView1.CaptureBitmap bmp = bmp.Resize(bmp.Width, bmp.Height * Ydpi / Xdpi, True)
Erel B4X founder Staff member Licensed User Longtime User Dec 9, 2022 #2 Something like: Code: Copy bmp = WebView1.CaptureBitmap.Resize(500, 500, True) 'no dip units Upvote 0