Hi,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.
Have a look on it please.
Attachment: files_9899146c.zip