Page 1 of 1

Dotted/Dashed lines output to printer show solid lines

Posted: Wed Jul 15, 2009 4:14 pm
by aldrich
Hello to everyone. I'm a first time user of TRichview.
After a week of playing with the trial version, I registered a full version of TRichview to use in my project.
My first impression with TRichview is very positive, it packs more features than I expected, and with extensive examples. I now have the report that employed TRichview almost done after two weeks.

I still have one very minor issue. Hope that I could get help.
I have successful inserted several images (EMF format) into the report exact the way I'd like to. In the image, there are some dotted and dashed lines. The images show up in TRichview and TRVPrintPreview are perfect. To print hard copies, I used the TRVPrint component.

The problem is, when I print the report to hard copies to a laser printer, or print to a PDF file. The dotted and dashed lines are shown as solid lines.
Is there a way to fix this? Thanks.

Posted: Fri Jul 17, 2009 8:35 pm
by Sergey Tkachenko
I am afraid that this problem cannot be easily fixed.
When printing metafiles, rvprint just draws them onto the printer canvas, relying on the windows drawing features.
But windows (gdi) can draw dashed/dotted lines only in one pixel width, otherwise they are drawn as solid lines. When printing, metafile 1px lines are drawn in several pixels width to compensate a difference in screen and printer resolutions, so all lines become solid (what is why trichview draws "breaks" using its own procedure, drawing dots as little circles instead of using the standard gdi line drawing; but it cannot do it for metafiles)

Posted: Mon Jul 20, 2009 11:24 pm
by aldrich
Understand. Just make sure that I have used TRichview at its fully ability as I'm new to it. I could get around by using bitmap (.bmp), but it's not as clear as emf.
Anyway, thanks for the reply.

Posted: Wed Jul 22, 2009 8:44 am
by Sergey Tkachenko
Or you can change a drawing procedure to draw a line pattern yourself. It's not difficult for vertical and horizontal lines.