Problem with TdxComponentPrinter (Delphi)

主宰稳场 提交于 2020-01-17 02:41:29

问题


TdxComponentPrinter is a componenet that allow me print a TPanel on a paper. But there is problem and when the panel contains TImage, the background of the image will be converted to black in the paper.

Before print :

After print (on the paper) :

I have tried different ways to solve this problem. for example i used Repaint; method of TPanel,... but doesn't work and the background of image is still black. I don't know why!!!

Help me please.


回答1:


This is a png file, which might not be supported completely in your Delphi version. Did you try to change it to a TcxImage which might be more compatible with the DevExpress printing system?

It also might be worth it to submit this issue to DevExpress if you can't fix it. They reply really quick and know more about their components then all of use here on SO :-)




回答2:


If it is already a jpg then you should improve the quality of the jpg. It looks like the black parts are compression artifacts where there is a mix between white and another color. If you clean up the background of the image with a paint program it will probably look a lot better.



来源:https://stackoverflow.com/questions/7090783/problem-with-tdxcomponentprinter-delphi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!