My goal is to build a FlowDocument containing XamDataChart and some other contents.
//Create a bitmap rendering the Chart:
RenderTargetBitmap renderVisual = new RenderTargetBitmap( width, height, dpiX, dpiY, format );
renderVisual.Render( xamDataChart );
//Scale the bitmap to fit page:
ScaleTransform transform = new ScaleTransform( ratio1, ratio2 );
TransformedBitmap bitmapToUse = new TransformedBitmap( renderVisual, transform );
Thus prepared “bitmapToUse” is then being placed into a FlowDocument and printed. However the quality of such printout is low probably due to re-scaling of the picture.
Is there a better way to do this?
Thank you.
Hello,
I am just checking if my last reply was helpful for you.
If you require any further assistance please do not hesitate to ask.
Your response did not help.
I’m already using “RenderTargetBitmap” the way it’s described in Peter’s blog – please refer to the first two lines (excluding comment) of the code snippet I provided. My problem is with pre-print scaling (lines three and four) that lowers the quality of picture. And I’m not saving it to file so your advice to use .jpeg is meaningless.
In a nutshell, I have a chart of random dimensions on the screen, I need to resize it proportionally to fit printer's paper size. Any thoughts?