在 Flex 中打印图像
在 s Flex 3 应用程序中,我有一个带有 PNG 图像作为背景的画布。图像具有相同的宽度和宽度。与画布的高度。我在画布中还有一些其他控件:
<mx:Canvas id="form" backgroundImage="@Embed(source='images/formBkg.png')" width="640" height="480" >
<mx:label .../>
<mx:label .../>
我使用以下代码打印画布:
var printJob:FlexPrintJob = new FlexPrintJob();
if (printJob.start())
{
printJob.addObject(form, FlexPrintJobScaleType.SHOW_ALL);
printJob.send();
}
在屏幕上它看起来很棒,但是当我打印它时,png 的质量会下降。它并不可怕,但不像屏幕上显示的那么清晰。
我能做些什么来提高打印的 png 的质量吗?
In s Flex 3 app, I have canvas with a PNG image for a background. The image is the same width & height as the canvas. I also have some other controls in the canvas:
<mx:Canvas id="form" backgroundImage="@Embed(source='images/formBkg.png')" width="640" height="480" >
<mx:label .../>
<mx:label .../>
I print the canvas using the following code:
var printJob:FlexPrintJob = new FlexPrintJob();
if (printJob.start())
{
printJob.addObject(form, FlexPrintJobScaleType.SHOW_ALL);
printJob.send();
}
On screen it looks great, but when I print it the quality of the png degrades. It is not terrible, but not as sharp as what is shown on screen.
Is there anything I can do to improve the quality of the printed png?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Flex 在打印方面表现不佳(穴居人的方法是创建大图像并将其推入打印机)。您应该考虑外部库,例如 AlivePDF
Flex doesn't do a great job at printing (caveman approach of creating a big image and shove it in the printer). you should consider external libraries such as AlivePDF