简体   繁体   中英

Issue printing complex visuals

I've had a report from the client who had issues printing (my) charts in WPF with a large number of data points. On the screen everything is visible. Here's a screenshot 屏幕截图

But when he prints it the part of the graph disappears in a pretty strange way. Here's a screenshot from printed PDF (same thing happens with actual printer) 印刷版

The printing is done using simple PrintVisual code

PrintDialog dialog = new PrintDialog();
if (dialog.ShowDialog() == true)
{
    dialog.PrintVisual(chart, "Chart");
}

I've tried to debug this but it seems that none of my rendering code gets called on printing (or at least no breakpoints get hit in Visual Studio) so I'm out of ideas of where to look.

If number of data points is relatively small everything prints out as expected.

Any ideas?

Thanks!

If found out that this issue is cause by the use of OpacityMask in the rendering process (which is not needed most of the time). If I don't use OpacityMask everything works just fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM