c# - Printing XPS document with image. Different image size when set different dpi -


i printing xps document images, contains qr-codes. image creating sample here:

 image image = createpresentation(qrcode);  image.height = 200;  image.width = 200;  image.horizontalalignment = horizontalalignment.center;  image.verticalalignment = verticalalignment.center;  image.stretch = stretch.none; 

where

 public static image createpresentation(system.drawing.image source)     {         stream stream = new memorystream();         source.save(stream, imageformat.png);         image image = new image();          bitmapimage src = new bitmapimage();         src.begininit();         src.streamsource = stream;         src.endinit();          image.source = src;         return image;     } 

when have monitor dpi=96 image size on printed page (on paper after printing) more larger when have montor dpi=120. how can print images same size on different dpi?

when replaced

 image.stretch = stretch.none; 

on

 image.stretch = stretch.fill; 

image began print correct


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -