2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
You can remove the hyperlink from existing document by using the “Remove” method available in the class “PdfLoadedAnnotationCollection”class. Please find the code snippet to remove the hyperlink from the existing document.
[C#] //Load the file PdfLoadedDocument lDoc = new PdfLoadedDocument("../../Data/TextWebLink.pdf"); for (int i = 0; i < lDoc.Pages.Count; i++) { //get the annotation collection PdfAnnotationCollection annotColl = lDoc.Pages[i].Annotations as PdfLoadedAnnotationCollection; for (int j = 0; j < annotColl.Count; j++) { //Get the annotaion PdfLoadedAnnotation annot = annotColl[j] as PdfLoadedAnnotation; if (annot is PdfLoadedTextWebLinkAnnotation || annot is PdfLoadedUriAnnotation) { //remove the hyperlinks annotColl.Remove(annot); } } } lDoc.Save("Sample.pdf"); lDoc.Close(true);
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/RemoveHyperlink-1083323766
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.