无法从任何浏览器到Word粘贴动态生成图像 [英] Can't paste dynamically generated image from any browser to MS Word

查看:176
本文介绍了无法从任何浏览器到Word粘贴动态生成图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有生成图像并压入这个浏览器的应用程序。图像显示完全没有难度,也可以通过右键点击保存,可以没有问题地粘贴到应用,如瘸子,但不能粘贴到MS Word。我与应用程序的各个方面拨弄,以确保内容的类型和所有其他的标题是正确的,但是这对能够在图像中粘贴没有影响。

I have an application that generates an image and then pushes this to the browser. The image displays with absolutely no difficulty, and can also be saved by right clicking, and can be pasted without issue into applications such as Gimp but cannot be pasted into MS Word. I fiddled with all aspects of the application to make sure that content-types and all other headers are correct, but this has no effect on being able to paste in the image.

推荐答案

解决方案是一个有些奇怪。它关系到表观事实的MS Word实际上重新下载基于存储在剪贴板中的HTML格式格式的内容从web图像。正因为如此,与URL问题可能会导致图像无法正常粘贴。

The solution is a little strange. It is related to the apparent fact that MS Word actually re-downloads the image from the web based on the contents of the "HTML Format" format stored in the clipboard. Because of this, issues with the URL can cause the image to not paste correctly.

在我的情况下,URL太长。我经过了很多的参数,以我的应用程序和URL字符串超过255个字符。它看起来像一个神奇的数字是253。所以,如果你似乎无法动态生成的图像复制到MS Word,这可能是你的问题。

In my case, the URL was too long. I was passing a lot of parameters to my application and the URL string exceeded 255 characters. It looks like the magic number is 253. So, if you can't seem to copy dynamically generated images into MS Word, this could be your issue.

此外,由于微软Word是做对的URL图像的请求,这也将失败(尽管在一个陌生人的方式),如果你的应用程序使用自签名的SSL证书,因为MS Word将尝试连接时失败安全。

Also, since MS Word is doing a request against the URL for the image, it will also fail (although in a stranger way) if your application uses a self-signed SSL certificate, because MS Word will fail when trying to connect securely.

这篇关于无法从任何浏览器到Word粘贴动态生成图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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