trying to remove all hyperlinks in a pdf

I am trying to remove all hyperlinks in a pdf document i followed this tutorial https://www.syncfusion.com/kb/9450/how-to-remove-the-hyperlinks-from-a-pdf-using-c-and-vb-net but it is not working as expected. i have attached the concerned pdf,

I also want to remove the active javascript content in this pdf,

Any help is much appreciated.


Thanks


Attachment: pdfhyperlink_b6e0d09b.zip


6 Replies

GK Gowthamraj Kumar Syncfusion Team February 18, 2022 01:04 PM UTC

Hi balj, 
 
We were able to reproduce the reported issue with provided document on our end. Currently, we are validating with provided document and we will update the further details on February 21st 2022. 
 
Regards, 
Gowthamraj K 



GK Gowthamraj Kumar Syncfusion Team February 21, 2022 12:08 PM UTC

Hi balj, 
 
We confirmed the issue “Null reference exception occurs when getting the annotation and count is empty in a particular PDF document as a defect in our product. We will include the fix for this issue in our upcoming weekly NuGet release, which will be available on March 1st , 2022. 
  
Please use the below feedback link to track the status of the reported bug. 
  
Please let us know if you need any further assistance in this. 
 
Regards, 
Gowthamraj K 



BA bala February 21, 2022 07:12 PM UTC

Hi thanks for quick turn around. kindly point me on the knowledge resource on how to detect an active content i.e. javascript present in a pdf


Thanks



GK Gowthamraj Kumar Syncfusion Team February 22, 2022 01:58 PM UTC

Hi balj,

If your requirement wants to detect the Javascript action in the PDF document, we can detect the JavaScript actions by using Action property from PdfLoadedDocument instance. We have attached the sample for your reference, please try the sample on your end and let us know satisfy your requirement or not.
 
 
Please find the code snippet, 
//Load a PDF document. 
 
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(stream); 
 
//Check and Change the javascript action in a pdf document. 
 
if (loadedDocument.Actions != null) 
{ 
    loadedDocument.Actions.AfterOpen = new PdfJavaScriptAction("app.alert(\"Modified Script!\")"); 
} 
 
MemoryStream stream1 = new MemoryStream(); 
 
loadedDocument.Save(stream1); 
 
 
 
Regards, 
Gowthamraj K 



BA bala replied to Gowthamraj Kumar February 23, 2022 08:59 PM UTC

Thanks Gowtham, i will come back if i have any other questions



GK Gowthamraj Kumar Syncfusion Team March 1, 2022 10:27 AM UTC

Hi balj, 

We have included the fix for this reported issue with “Null reference exception occurs when getting the annotation and count is empty in a particular PDF document in our latest weekly NuGet release (19.4.0.54). Please use the below link to download our latest weekly NuGet,      
 
 
Please let us know if you have any concerns on this 
 
Regards, 
Gowthamraj K 


Loader.
Up arrow icon