如何改善打印的图像质量? [英] how can I improve image quality for printing?

查看:115
本文介绍了如何改善打印的图像质量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在解决程序(ReportGenerator)中的一个问题,该问题似乎与打印的报告有关,或者是质量很差或太大.

该项目涉及两个线程的使用,这两个线程同步准备页面以供预览和打印的任务.这两个线程的起点使我无法在适当的时候使用PrintPageEventArg(PrintDocument_PrintPage的输入),以便使用可以提高打印质量的电子图形.若要尝试解决此问题,我从位图(graphics.FromImage(bitmap))创建了一个图形,但这会产生自己的问题.为了使用此事件,我必须更改线程的起点,这甚至会导致进一步的问题.我的时间有限,无法花时间完全重写该项目.关于我可以尝试什么以找到解决方法的任何建议?

这是项目的总体概述,包括线程和我的方法:

1.打印显示对话框->好的
2. Print_Document_BeginPrint->主题从这里开始
3.从bitmap(graphics.FromImage(bitmap))创建图形
从这里开始,如果我可以使用PrintPageEventArg,我的问题将得到解决,但我不是那么幸运

或者,我可以创建一个位图并在其上绘制准备好的图形(graphics.Draw(.. bitmap ...)),将此图像保存在系统上,然后将其还原到PrintDocument_PrintPage中.此方法允许我使用PrintPageEventArg,但仅在恢复先前创建的图形并打印它们.

我之前在这些链接上已经问过与此问题有关的问题.
http://stackoverflow.com/questions/11644115/how-to-improve-printed-text-quality-after-using-graphics-drawstring
http://stackoverflow.com/questions/11699219/save-an-image-as-a-bitmap-without-losing-quality

任何帮助将不胜感激.预先表示感谢.

I am working on fixing a problem in a program (ReportGenerator) which seems to be an issue with the printed report, either being extremely poor quality or much too large.

This project involves the use of two threads that synchronize the task of preparing the pages for preview and printing them. The start points for these two threads are preventing me from using PrintPageEventArg (an input of PrintDocument_PrintPage) at the proper time in order to use e.graphics that can improve the print quality. To try and work around this issue I created a graphic from a bitmap (graphics.FromImage(bitmap)) but this creates its own problems. In order to use this event I must change the start points for the threads causing even further problems. I have a limited time and I cannot take the time to completely re-write this project. Are there any suggestions as to what I may be able to try in order to find a workaround?

This is a general overview of the project, including the threads and my methods:

1. Print Show Dialog -> ok
2. Print_Document_BeginPrint -> Thread begins here
3.Create a graphic from bitmap(graphics.FromImage(bitmap))
From here if I could use PrintPageEventArg my issues would be solved but I am not that lucky

Alternatively I could create a bitmap and draw a prepared graphic on it (graphics.Draw(..bitmap...)) saving this image on the system and then restore it in PrintDocument_PrintPage,This method allows me to use PrintPageEventArg but only after I restore the previously created graphics and print them.

I have asked questions related to this problem before on these links.
http://stackoverflow.com/questions/11644115/how-to-improve-printed-text-quality-after-using-graphics-drawstring
http://stackoverflow.com/questions/11699219/save-an-image-as-a-bitmap-without-losing-quality

Any help would be greatly appreciated. Thanks in advance.

推荐答案

提高打印质量的唯一真正方法是创建质量更高的更大位图. GIGO.

graphics.FromImage(bitmap)会创建一个精确的副本,但是,这样做不应该失去质量.
The only real way to improve print quality is to create a larger bitmap that is finer quality. GIGO.

graphics.FromImage(bitmap) creates an exact copy, though, you should not lose quality doing that.


我尝试过,但是由于向打印机发送了大量图像,打印速度变慢了.
I tried that , but printing became slow due to sending large amount of image to printer.


这篇关于如何改善打印的图像质量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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