Problem with TdxComponentPrinter (Delphi)

2019-08-27 17:30发布

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 :

enter image description here

After print (on the paper) :

enter image description here

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.

2条回答
走好不送
2楼-- · 2019-08-27 18:04

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.

查看更多
太酷不给撩
3楼-- · 2019-08-27 18:08

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 :-)

查看更多
登录 后发表回答