Query |
Details |
I tried the demo but I have a problem.
What I want to do is exactly what is done in the last method of MainPage.xaml.cs => button_Click
But when I try to add a two annotations in this way, there is an ArgumentNullException (in the demo).
Do you know what causes the bug ?
|
We are unable to reproduce the mentioned issue. We can able to add multiple annotations in a PDF document. Here we have prepared a sample which includes multiple annotations in the single page of a PDF document. Please modify this sample or provide us a sample to reproduce the mentioned issue. This will be helpful for us to look in to this issue. |
And I would like to be able to highlight and strikethrough text, but when I create an annotation, it uses all the surface I gave, not just the surface where there is text. Is it possible to know where there is text ? |
The co-ordinates of the text can be get from the GetTextCoordinates() method of PdfViewerControl. Using the coordinates, we can add highlight annotation to the text. Please find the code snippet to get the coordinates of the particular text.
>>>>>>>>>>>>>>>>>>
pdfViewer.GetTextCoordinates("1D/Linear BarCodes", 0, out coords);
>>>>>>>>>>>>>>>>>>>>>>>>
We have prepared a sample using which you add the highlight annotation to the text programmatically. |
Queries |
Details |
For the bug, I just downloaded again the sample (http://www.syncfusion.com/downloads/support/directtrac/general/ze/PdfViewer_UWP1736746709 ), runs it and clicked on the "Add Annotation" button on the middle of the screen.
Since it adds an annotation programmatically in an open pdf viewer, that is exactly what I'm looking for. |
We were able to reproduce the reported issue, and we have fixed it my modifying the sample. The modified sample can be downloaded from the below link.
Please try this sample and let us know if you face any issues,
|
I've just tested the GetTextCoordinates but that's not quite what I need.
I need to get the coordinates of a text in a selected zone. |
Can you please provide us the more details on this requirement?
Are you trying to get the coordinates of the text using text selection or using annotations?
It will be helpful for us to analyze more and assist you better on this. |