I have a pdf file.I need to find all the hyperlinks available in that file and then make change on those links. I am using C# and I'd rather not to use a third party tool!
+2
A:
You can use iTextSharp. Its an open-source API to manipulate pdf written in c#.
The basic algorithm would be:
- Loop through every pages in the PDF file.
- For every page, loop through every annotation in the annotations collection (annots dictionary).
- If you found an annotation of subtype link, increases your count or do whatever logic you need to do.
RWendi
2008-10-06 23:41:48
I am having a hard time figureing out the API. Shoud I do something like this:PdfReader reader = new PdfReader("c:\\sample2.pdf");PdfDictionary dic = reader.GetPageN(1);
Houda
2008-10-08 21:39:59