PrintDialog prints the same image several times when images in the document are specified using a byte array
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
The issue occurs when the printed document contains a page with several images whose sources are set as byte[]. In this scenario, the document is printed with the same image. If images are set using BitmapImage instead of byte[], the document is printed as expected. Additionally, if the same document is rendered to a bitmap using the RenderTargetBitmap.Render method, the result also contains proper images even when byte[] is used. Attached is a sample project demonstrating the issue: printsample.zip
Steps to reproduce:
1. Click 'Print"
2. Select the virtual PDF printer and print the document.
You will notice that both images in the document are equal:
Image:79422-acrord32-2019-06-18-18-32-42.png
Click the 'Export' button to ensure that the page is properly rendered by the RenderTargetBitmap.Render method.
_This issue has been moved from https://developercommunity.visualstudio.com/content/problem/612416/printdialog-prints-the-same-image-several-times-wh.html
VSTS ticketId: 927454_
_These are the original issue comments:_
(no comments)
_These are the original issue solutions:_
(no solutions)
Contributor guide
Assessment
This issue has not been assessed yet.