Localreport渲染EMF图像dpi设置 [英] Localreport render EMF image dpi settings
问题描述
嗨大家好,
我正在开展一个项目,其中应该改变 localreport (VS2005)。
我将报告呈现为EMF输出格式,然后将流保存为tiff图像。
如果报告长度为多页,我会得到多个流和多个tiff图像。到目前为止一切顺利。但分辨率太低了。保存的报告中的文字tiff有点模糊。
==> 如何在渲染的EMF中获得更高的分辨率?
我试图在DeviceInfo中指定dpi ,但无论指定什么,它总是96dpi。
如果我将outputformat更改为TIFF,那么DpiX和DpiY设置可以正常工作......但是我遇到了另一个问题。在TIFF输出格式的情况下,我只返回1个流,即使我的报告长度超过1页。这导致tiff文件只包含第一页...
感谢您的帮助!
Lieven。
Hi folks,
I am working on a project in which a localreport (VS2005) should be tiffed.
I render the report to an EMF outputformat and then save the streams as a tiff image.
If the report is multiple pages long, I get multiple streams and multiple tiff images. So far so good.
The resolution however is too low. Text in the saved report tiff is kinda blurry.
==> How can I get a higher resolution in the rendered EMF?
I have tried to specify the dpi in the DeviceInfo, but whatever specified, it is always 96dpi.
If I change the outputformat to TIFF, then the DpiX and DpiY settings do work... but then I encounter another problem. In the TIFF outputformat case, I get only 1 stream back, even if my report is more than 1 page long. This results a tiff file containing only the first page...
Thanks for your help!
Lieven.
推荐答案
我最初认为你应该将StartPage设置为零,但后来我抓住了你的代码并尝试了它,我认为你和我之间的区别是我将OutputFormat设置为TIFF而不是EMF,因为这是您最终想要的结果。
多页生成就好了。
I initially thought you should set the StartPage settings to zero, but then I grabbed your code and tried it and I think the difference between yours and mine is I set the OutputFormat to TIFF instead of EMF since that is what you want to end up with anyway. It generates just fine with multiple pages.
http://msdn.microsoft.com/en-us/library/ms155373.aspx
http://msdn.microsoft.com/en-us/library/ms155373.aspx
这篇关于Localreport渲染EMF图像dpi设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!