개정판 89971d17
print/export 수정
Change-Id: I479498529189f3af082f9e6ada9dd6c28ccb00f0
KCOM/Controls/PrintControl.xaml.cs | ||
---|---|---|
444 | 444 |
//bitmap.Source = bitmapframe; |
445 | 445 |
//bitmap.Width = Convert.ToDouble(currentPage.PAGE_WIDTH); |
446 | 446 |
//bitmap.Height = Convert.ToDouble(currentPage.PAGE_HEIGHT); |
447 |
|
|
448 |
if (uri.Scheme == Uri.UriSchemeFile) |
|
449 |
{ |
|
450 |
var cloneUri = new Uri(System.IO.Path.Combine(System.IO.Path.GetTempPath(),System.IO.Path.GetRandomFileName()),UriKind.Absolute); |
|
451 |
File.Copy(uri.LocalPath, cloneUri.LocalPath); |
|
452 |
|
|
453 |
uri = cloneUri; |
|
454 |
} |
|
455 |
|
|
447 | 456 |
printCanvas.Children.Clear(); |
448 | 457 |
printCanvas.Width = Convert.ToDouble(currentPage.PAGE_WIDTH); |
449 | 458 |
printCanvas.Height = Convert.ToDouble(currentPage.PAGE_HEIGHT); |
450 |
printCanvas.Background = new ImageBrush { ImageSource = new BitmapImage(uri)}; |
|
459 |
|
|
460 |
printCanvas.Background = new ImageBrush{ ImageSource = new BitmapImage(uri)}; |
|
451 | 461 |
|
452 | 462 |
//printCanvas.RenderTransformOrigin = new Point(0.5, 0.5); |
453 | 463 |
//printCanvas.RenderTransform = new RotateTransform(currentPage.PAGE_ANGLE); |
... | ... | |
501 | 511 |
return result; |
502 | 512 |
//})); |
503 | 513 |
} |
514 |
|
|
515 |
|
|
504 | 516 |
public static MemoryStream ByteBufferFromImage(BitmapImage imageSource) |
505 | 517 |
{ |
506 | 518 |
var ms = new MemoryStream(); |
내보내기 Unified diff