Printing 3D frame

Hi Friends!

I rewritten the TfrxView's DrawBackground method for providing me a custom 3D frame around the visible components of the report. It works perfectly in the designer and in the preview window. But on the printed document it is almost disappear. There is a big difference between the previewed and the printed report components.

For more details see these shots:
- components in the designer
- components in the preview window

So, is there any tricks about printing the report components? As I saw, the printing is done with the inherited Draw methods of the components, that also calls the DrawBackground method.

My code uses the ExtCtrls unit's Frame3D method for achieving this effect. What is wrong? The printer's Canvas doesn't support fully this drawing method?

When I took a screenshot from the preview window and then printed the image, the result were perfect, the 3D frame looked nice.

TIA:Alex :-)

Comments

  • edited 3:49PM
    Problem solved. I realized that the problem was the resolution difference between the screen canvas and the printer canvas. The solution is when IsPrinting is true, then I first draw the frame on a TMetaFileCanvas, because of its device independency. And then draw that canvas onto the printer with the PlayEnhMetaFile API function. It is perfect solution.

    Cheers:Alex :-)

Leave a Comment