Page 1 of 1

Problems when printing chart on monochrome printer

Posted: Thu Apr 02, 2009 9:08 am
by 15049572
Hi

My app in VB6 is al most there, but some users can not get the print out correct, chart is missing, or is white on the paper.

First I did not understand what went wrong, since it worked perfectly on my color laser, in color and gray scale. But now I have a monochrome printer, an I can see the problem. It should be straight forward, but I can not figure out how to solve the problem.

If I set the "smooth" property to true in the preview window, the output is visible. But if I select an option in the Brother printer driver "enhance printing in gray scale" the print is fine.

But how can I control these settings ?

hope anyone can help !

Regards
Kasper

Posted: Mon Apr 06, 2009 1:44 pm
by narcis
Hi Kasper,

You could try assigning printer settings like this:

tchart1.Printer.PrinterSettings.XXXXX

It could also be a printer device driver problem. You could try upgrading printer's driver.

Posted: Tue Apr 07, 2009 9:04 am
by 15049572
Hi again
tchart1.Printer.PrinterSettings.XXXXX
I have tried a lot of different settings, but nothing seems to fix my problem. If I use the feature demo, and search for preview, I can select the "Custom Editor and Previewer".

If I in here add a series, and than add a dotted grid. I have a chart with some dotted grid lines. If I print the chart by using my monochrome printer, the grid line is gone. But if I check the "smooth" option in the preview window, it is on !!

Wat does the smooth option do ? This could help me out ....

This problem is on HP and Brother printers with the newest drivers.

Regards
Kasper

Posted: Tue Apr 07, 2009 9:08 am
by narcis
Hi Kasper,

Here you'll find what the smooth option does.

Hope this helps!

Posted: Tue Apr 07, 2009 1:32 pm
by 15049572
Hi NarcĂ­s

My application needs to be able to print without any user interactions. Therefore your solution do not solve my problem. However, it inspired me to make a work around.

I need to to export the chart to a jpeg file, and then import it again and print it out. This works fine. But it would be easier, if you could fix your problem in the teeChart object, so the way of making a print out is the same on color as on monochrome printers :-)

Regards
Kasper

Posted: Thu Apr 09, 2009 11:03 am
by narcis
Hi Kasper,

You could try setting:

Code: Select all

TChart1.Canvas.Monochrome = True
Before printing and setting it back to false after printing.

Posted: Tue Apr 14, 2009 7:25 am
by 15049572
I have tried that, but can not see any different between true or false :(

Posted: Thu Apr 16, 2009 9:47 am
by Pep
Hi,

in the case a solution for you is to set the Smooth option before to print ( it creates a bitmap of the chart internally ) you could set it by default to true by using :

Code: Select all

Private Sub Command1_Click()
With TeePreviewer1
.Chart = TChart1
.Options.AsBitmap = True
.ShowPreview
End With
End Sub