I could be this problem :
Unexpected results when printing from some apps after installing updates released March 9, 2021 or March 15, 2021
GDI bitmap printing got broken sometime after Feb 2021?
Hello,
Sometime after Feb 2021, Win GDI using PlgBlt (or BitBlt) no longer prints bitmap images. This is for different PC's and using Print to PDF as well as with a real printer. I know the code has worked for many years and has not changed, here the API calls:
hdcMem = CreateCompatibleDC(hdc);
SetStretchBltMode(hdc, COLORONCOLOR);
//pbmInf = incoming bitmap
hbm = CreateDIBSection(hdc, (LPBITMAPINFO)pbmInf, DIB_RGB_COLORS, (void**)&pbmDib, NULL, 0);
GdiFlush();
pbmData = _getbmpbits(pbmInf, NULL); //my code to get the data
SetDIBits(hdc, hbm, 0, pbmInf->cy, pbmData, (LPBITMAPINFO)pbmInf, DIB_RGB_COLORS);
SelectObject(hdcMem, hbm);
//using an array of 3 prepared points
POINT pnt[4];
CalculateCoordinates(pnt); //my code to get the coordinates
rc = PlgBlt(hdc, pnt, hdcMem, 0, 0, pbmInf->cx, pbmInf->cy, 0, 0, 0);
I also tried with BitBlt, same result. The image is painted on the screen, but will not print to pdf or to a printer. The application was recently High Resolution enabled, does that make a difference?
What has changed, and how can I fix it? Or, is this problem known, and/or will it be fixed?
Applies to:
Edition Windows 10 Pro
Version 20H2
Installed on 14/10/2020
OS build 19042.867
Experience Windows Feature Experience Pack 120.2212.551.0
Kind Regards,
Peter