//BitmapSource[] image = pdfviewercontrol.ExportAsImage(0, pdfviewercontrol.LoadedDocument.Pages.Count - 1);
BitmapSource[] image = new[] { pdfviewercontrol.ExportAsImage(0) };
Follow these steps:
|
I've found strange behavior of your sample, probably a bug.
I'm exporting only the first page, with this code change:
//BitmapSource[] image = pdfviewercontrol.ExportAsImage(0, pdfviewercontrol.LoadedDocument.Pages.Count - 1);
BitmapSource[] image = new[] { pdfviewercontrol.ExportAsImage(0) }; Follow these steps:
Run the sample
Add textbox annotation
Click ExportToImage button
In the resulting image you'll see the text box twice. See attached file - image and also edited pdf. If you open this pdf and just export to image, you'll see again two text boxes. In the preview it is OK - only once.
Strange part is when you change the export method to this:
BitmapSource[] image = pdfviewercontrol.ExportAsImage(0, 0);
all works fine again. So I think the problem is only in ExportAsImage method with one parameter.
|
On analyzed further, we found the reported issue “ExportAsImage with single parameter resultant image have improper count of text annotation” is a defect and we have logged a defect report for this. The patch for this fix is expected to be available on February 12th, 2021.
Please find the feedback link below
|
This private feedback is not associated with your account.