在最新的安全更新后无法打印图像 [英] Images not printing after the latest security update

查看:15
本文介绍了在最新的安全更新后无法打印图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序在最新的安全性之后无法打印更新.

所有 API 调用均未失败,但即使在 PDF 中也无法显示图像.文本和线条等形状打印良好.

None of the API calls fail, yet the images don't show even in PDF. Text and shapes like lines print fine.

该代码使用 IPicture 接口和 OleLoadPicture() 加载 JPG 图像.然后我使用它的 Render() 调用将其转换为 HBITMAP,最后在打印 HDC 时使用 StretchBlt().

The code loads a JPG image using IPicture interface and OleLoadPicture(). Then I use its Render() call to convert it into a HBITMAP and finally StretchBlt() on printing HDC.

没有一个调用失败,所有的返回值都被检查.一切正常,直到今天和最新的 Windows 安全更新.当然,如果我卸载计算机上的 KB5000808 更新或客户端计算机上的 KB5000802,一切都会恢复正常,但这不是长期解决方案.

None of the calls fail, all return values are checked. Everyhing worked fine until today and latest Windows security updates. Sure, if I uninstall KB5000808 update on my computer or KB5000802 on my client's computer everything is back to normal but this is not a long term solution.

今天有人遇到类似的问题吗?知道如何解决这个问题吗?还有其他打印图片的方法吗?

Anyone having similar problems as of today? Any idea how to solve this? Any other way to print images?

即使我使用位图而不是 JPG 图像,也会出现同样的问题.所以JPG渲染没有问题.另一方面,JPG 和 BITMAP 都显示在屏幕上.只有打印不起作用.

Same problem even if I use a bitmap instead of a JPG image. So there's no problem with JPG rendering. On the other hand, both JPG and BITMAP show on the screen. Only printing does not work.

推荐答案

我使用 StretchDIBits 而不是 StretchBlt win32 api 解决了

I solved by using StretchDIBits instead of StretchBlt win32 api

这篇关于在最新的安全更新后无法打印图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆