Image size and location change at time of printing
-
hi all, i draw a image when i preview it its display ok but at time of printing the image location and size is different. i really don understand whats going wrong here please help me for this. i m using this to draw image.
Graphics graphics(pDC->GetSafeHdc());
Image myPNG(path);
if(myPNG.GetLastStatus()!=Ok)
{
return FALSE;
}graphics.DrawImage(&myPNG, (INT)image\_rect.left, (INT)image\_rect.top, 300, 300); return TRUE;
thanks in advance.
-
hi all, i draw a image when i preview it its display ok but at time of printing the image location and size is different. i really don understand whats going wrong here please help me for this. i m using this to draw image.
Graphics graphics(pDC->GetSafeHdc());
Image myPNG(path);
if(myPNG.GetLastStatus()!=Ok)
{
return FALSE;
}graphics.DrawImage(&myPNG, (INT)image\_rect.left, (INT)image\_rect.top, 300, 300); return TRUE;
thanks in advance.
-
Your size parameter values need to be scaled for output to a printer. When drawing to the screen 300 is the number of pixels, but when drawing to a printer it is the number of dots. See SetMapMode function (Windows)[^].
-
Your size parameter values need to be scaled for output to a printer. When drawing to the screen 300 is the number of pixels, but when drawing to a printer it is the number of dots. See SetMapMode function (Windows)[^].
-
sir now one more issue occur here when i print with multiple page. on first page its drawimage correctly but after first page it return generic error. i really dont understand what happen here. please help me for this. thanks in advance.