gpt4 book ai didi

c# - Word 2007 Automation - 图像在打印时显示为黑框

转载 作者:太空宇宙 更新时间:2023-11-03 14:23:28 26 4
gpt4 key购买 nike

当我使用 Word 2007 Interop 进行打印时,打印副本中没有显示图像。它只显示占位符的黑框。但是,当它从 Word 手动打印时(没有 Interop)就没问题。

If some graphics are not printing (or not displaying in Print Preview), go to Office Button | Word Options | Display: Printing options and make sure that “Print drawings created in Word” is checked.

我试过设置

Options.PrintDrawingObject = true;

但是没有效果。有什么想法吗?

最佳答案

原来是word 2007中好像有bug导致了这个问题。这是由于图像在保存时的链接方式。

Select all (CTRL + A)
Click on the Office Icon (circular icon in top left corner)
Go to prepare
Click on "edit links to files"
Check the "save picture in document" box
Click ok
Save

我还没有想出在互操作中执行此操作的方法(我认为有一种方法可以使热键自动化,但这感觉像是 hack)。

关于c# - Word 2007 Automation - 图像在打印时显示为黑框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4726378/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com